This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Makefile] Split STAGESTUFF into STAGE{COPY,MOVE}STUFF
- From: Kelley Cook <kcook at gcc dot gnu dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 27 Aug 2004 14:38:33 -0400
- Subject: [Makefile] Split STAGESTUFF into STAGE{COPY,MOVE}STUFF
- Hop-count: 1
Currently the files listed in STAGESTUFF get moved to the stageN
directories. This includes all of the generated *.[ch] files. I renamed
STAGESTUFF into STAGEMOVESTUFF and then split out generated files to
STAGECOPYSTUFF.
Unsurprisingly, I now "mv" the STAGEMOVESTUFF and "cp -p" the
STAGECOPYSTUFF. The advantage is that the move-if-change check already
in place for the generated files now actually has something to compare
against post-stage1. But this actually has no speedup effect … yet.
Bootstrapped on i686-pc-cygwin. Moreover, in a bootstrap before and
after this patch, besides "Makefile" there are no differences between
the build gcc/ directory. The only discernible difference is that after
the patch the dates for the generated *.[ch] files will still be left
over from stage1.
This patch can be applied independently of yesterday's pending patch to
move build file to a build/ directory.
OK to install?
2004-08-27 Kelley Cook <kcook@gcc.gnu.org>
* Makefile.in (STAGESTUFF): Split into ...
(STAGECOPYSTUFF, STAGEMOVESTUFF): ... these.
(mostlyclean): Update.
(stage1-start, stage2-start, stage3-start, stage4-start,
stageprofile-start, stagefeedback-start): Copy the STAGECOPYSTUFF.
Move the STAGEMOVESTUFF.
--- gcc-orig/gcc/Makefile.in 2004-08-19 06:35:45.000000000 -0400
+++ gcc-snapshot/gcc/Makefile.in 2004-08-27 13:39:39.711925800 -0400
@@ -927,13 +927,17 @@ OBJS-onestep = libbackend.o $(OBJS-archi
BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB)
-# Files to be copied away after each stage in building.
-STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
+# Files to be copied after each stage in building.
+STAGECOPYSTUFF = insn-flags.h insn-config.h insn-codes.h \
insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
insn-attr.h insn-attrtab.c insn-opinit.c insn-preds.c insn-constants.h \
tm-preds.h \
tree-check.h insn-conditions.c min-insn-modes.c insn-modes.c insn-modes.h \
- s-flags s-config s-codes s-mlib s-genrtl s-modes s-gtype gtyp-gen.h \
+ genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-gen.h
+
+# Files to be moved away after each stage in building.
+STAGEMOVESTUFF = *$(objext) \
+ s-flags s-config s-codes s-mlib s-genrtl s-modes s-gtype \
s-gtyp-gen s-output s-recog s-emit s-extract s-peep s-check s-conditions \
s-attr s-attrtab s-opinit s-preds s-constants s-crt0 \
genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \
@@ -942,7 +946,6 @@ STAGESTUFF = *$(objext) insn-flags.h ins
genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \
gencheck$(build_exeext) genpreds$(build_exeext) genconstants$(build_exeext) \
gengtype$(build_exeext) genconditions$(build_exeext) genmodes$(build_exeext) \
- genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c \
xgcc$(exeext) cpp$(exeext) cc1$(exeext) $(EXTRA_PASSES) \
$(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
protoize$(exeext) unprotoize$(exeext) \
@@ -3003,7 +3006,7 @@ fsf-funding.pod: funding.texi
# (less duplicated code).
mostlyclean: lang.mostlyclean
- -rm -f $(STAGESTUFF)
+ -rm -f $(STAGECOPYSTUFF) $(STAGEMOVESTUFF)
-rm -f *$(coverageexts)
-rm -rf libgcc
# Delete the temp files made in the course of building libgcc.a.
@@ -3863,7 +3866,8 @@ stage1-start:
done
# If SPECS is overridden, make sure it is `installed' as specs.
-mv $(SPECS) stage1/specs
- -mv $(STAGESTUFF) stage1
+ -mv $(STAGEMOVESTUFF) stage1
+ -cp -p $(STAGECOPYSTUFF) stage1
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then (cd stage1 && $(LN_S) ../as$(exeext) .) ; else true ; fi
@@ -3898,7 +3902,8 @@ stage2-start:
done
# If SPECS is overridden, make sure it is `installed' as specs.
-mv $(SPECS) stage2/specs
- -mv $(STAGESTUFF) stage2
+ -mv $(STAGEMOVESTUFF) stage2
+ -cp -p $(STAGECOPYSTUFF) stage2
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then (cd stage2 && $(LN_S) ../as$(exeext) .) ; else true ; fi
@@ -3929,7 +3934,8 @@ stage3-start:
done
# If SPECS is overridden, make sure it is `installed' as specs.
-mv $(SPECS) stage3/specs
- -mv $(STAGESTUFF) stage3
+ -mv $(STAGEMOVESTUFF) stage3
+ -cp -p $(STAGECOPYSTUFF) stage3
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then (cd stage3 && $(LN_S) ../as$(exeext) .) ; else true ; fi
@@ -3960,7 +3966,8 @@ stage4-start:
done
# If SPECS is overridden, make sure it is `installed' as specs.
-mv $(SPECS) stage4/specs
- -mv $(STAGESTUFF) stage4
+ -mv $(STAGEMOVESTUFF) stage4
+ -cp -p $(STAGECOPYSTUFF) stage4
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then (cd stage4 && $(LN_S) ../as$(exeext) .) ; else true ; fi
@@ -3989,7 +3996,8 @@ stageprofile-start:
do \
if [ -d stageprofile/$$dir ] ; then true ; else mkdir stageprofile/$$dir ; fi ; \
done
- -mv $(STAGESTUFF) stageprofile
+ -mv $(STAGEMOVESTUFF) stageprofile
+ -cp -p $(STAGECOPYSTUFF) stageprofile
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then (cd stageprofile && $(LN_S) ../as$(exeext) .) ; else true ; fi
@@ -4018,7 +4026,8 @@ stagefeedback-start:
do \
if [ -d stagefeedback/$$dir ] ; then true ; else mkdir stagefeedback/$$dir ; fi ; \
done
- -mv $(STAGESTUFF) stagefeedback
+ -mv $(STAGEMOVESTUFF) stagefeedback
+ -cp -p $(STAGECOPYSTUFF) stagefeedback
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../as$(exeext) .) ; else true ; fi