summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-18 20:08:17 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-18 20:08:17 +0000
commitadcf10adfb850c2eeb3d8cea29453e239195ee97 (patch)
tree0978efa53fcbb61ac272b80035abbb0131ed9600 /Makefile.in
parent4c8e5f94b1953085c2450ecd3d864a758b2a0498 (diff)
use a tempfile while generating sysnum.h
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in
index 300d095df..c3c5bc381 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -92,11 +92,13 @@ headers: include/bits/uClibc_config.h
$(Q)\
set -e; \
cd $(top_builddir); \
- top_builddir=. CC="$(CC)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > include/bits/sysnum.h.new; \
- if cmp include/bits/sysnum.h include/bits/sysnum.h.new >/dev/null 2>&1; then \
- $(RM) include/bits/sysnum.h.new; \
+ tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null`; \
+ [ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
+ top_builddir=. CC="$(CC)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \
+ if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
+ $(RM) $$tmp; \
else \
- mv -f include/bits/sysnum.h.new include/bits/sysnum.h; \
+ mv -f $$tmp include/bits/sysnum.h; \
fi
ifeq ($(UCLIBC_HAS_LOCALE),y)
$(MAKE) locale_headers