This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Use move-if-change on macro_list dependency


Dan Berlin said

> Every time i do "make restage1", it reruns fixincludes.
> 
> According to Steven Bosscher, if you change any single source
> file. fixincludes is now rerun.

I think this should fix it.

Tested by 'make bootstrap' on powerpc-darwin.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-fixinccross-moveifchange.patch========
2004-11-11  Geoffrey Keating  <geoffk@apple.com>

	* Makefile.in (macro_list): Use move-if-change to avoid spurious
	rebuilds.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1419
diff -u -p -p -u -r1.1419 Makefile.in
--- Makefile.in	8 Nov 2004 21:49:07 -0000	1.1419
+++ Makefile.in	12 Nov 2004 19:02:43 -0000
@@ -2792,7 +2792,8 @@ macro_list : $(GCC_PASSES)
 	echo | $(GCC_FOR_TARGET) -E -dM - | \
 	  sed -n 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p ; \
 		s/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
-	  sort -u > $@
+	  sort -u > tmp-$@
+	$(SHELL) $(srcdir)/../move-if-change tmp-$@ $@
 
 # Build fixed copies of system files.
 stmp-fixinc: gsyslimits.h macro_list \
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]