patch-2.4.19 linux-2.4.19/arch/arm/tools/Makefile
Next file: linux-2.4.19/arch/arm/tools/mach-types
Previous file: linux-2.4.19/arch/arm/nwfpe/softfloat.h
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Fri Aug 2 17:39:42 2002
- Orig file:
linux-2.4.18/arch/arm/tools/Makefile
- Orig date:
Thu Oct 11 09:04:57 2001
diff -urN linux-2.4.18/arch/arm/tools/Makefile linux-2.4.19/arch/arm/tools/Makefile
@@ -15,13 +15,17 @@
# what we want. We do this in several stages so make picks up on
# any errors that occur along the way.
-$(TOPDIR)/include/asm-arm/constants.h: constants-hdr getconstants.c
- $(CC) $(CFLAGS) -S -o - getconstants.c > $@.tmp.1
+constants.h: constants-hdr getconstants.c
+ $(CC) $(CFLAGS) -S -o $@.tmp.1 getconstants.c
sed 's/^\(#define .* \)[#$$]\(.*\)/\1\2/;/^#define/!d' $@.tmp.1 > $@.tmp.2
- cat constants-hdr $@.tmp.2 > $@.tmp
- cmp $@.tmp $@ >/dev/null 2>&1 || mv $@.tmp $@
+ cat constants-hdr $@.tmp.2 > $@
$(RM) $@.tmp*
+# Only update include/asm-arm/constants.h when it has actually changed.
+
+$(TOPDIR)/include/asm-arm/constants.h: constants.h
+ cmp constants.h $@ >/dev/null 2>&1 || cp -p constants.h $@
+
# Build our dependencies, and then generate the constants and
# mach-types header files. If we do it now, mkdep will pick
# the dependencies up later on when it runs through the other
@@ -29,7 +33,7 @@
dep:
$(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS) -- getconstants.c |\
- sed s,getconstants.o,$(TOPDIR)/include/asm-arm/constants.h, > .depend
+ sed s,getconstants.o,constants.h, > .depend
$(MAKE) all
.PHONY: all dep
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)