summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-02-23 10:17:41 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-03-14 22:49:25 +0100
commit115577807b0c1d65b97255fe5336ac5c257da5a1 (patch)
treecccd78ba491f139ea6e6fbcce8ecb54f8adcc879 /Makefile.in
parent8b150a9491490fd4464de0f1228762c921dc7f64 (diff)
buildsys: remove calls to mktemp
Nowadays we should not be racy in this area anymore, so simplify generating temporary build-files. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in14
1 files changed, 4 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in
index 163184bca..80c70994b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -182,20 +182,14 @@ pregen: headers pregen-headers
$(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh | $(top_builddir)include/bits
@$(disp_gen)
$(Q)set -e; \
- tmp=`mktemp $(top_builddir)include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
- [ -z "$$tmp" ] && tmp='$(top_builddir)include/bits/sysnum.h.new'; \
- KERNEL_HEADERS="${KERNEL_HEADERS}" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $$tmp; \
- if cmp $(top_builddir)include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
- $(RM) $$tmp; \
- else \
- mv -f $$tmp $(top_builddir)include/bits/sysnum.h; \
- fi
+ KERNEL_HEADERS="${KERNEL_HEADERS}" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $@.new; \
+ cmp -s $@ $@.new && $(RM) $@.new || mv -f $@.new $@
@# Ugly linux specific hack..
$(Q)if grep -q __NR_ $@; then true; else \
rm -f $@; \
echo "ERROR: Could not generate syscalls."; \
- echo "Make sure that you have proper kernel headers."; \
- echo "Your .config in KERNEL_HEADERS=\"\" was set to:"; \
+ echo "Make sure that you have properly installed kernel headers."; \
+ echo "Your .config KERNEL_HEADERS=\"\" was set to:"; \
echo "${KERNEL_HEADERS}"; \
exit 1; \
fi