This is the mail archive of the 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]

PATCH RFA: Add some stamp files to

The files options.c, options.h, and gtyp-gen.h all currently depend
upon Makefile, but are created via move-if-change.  This means that
when Makefile changes for some unrelated reason, they are always
rebuilt--since move-if-change doesn't update their mtime, Makefile is
always newer.  This does little harm, but does no good, and clutters
up make output.

This patch adds the appropriate stamp files to avoid rebuilding the
files unnecessarily.  This patch also adds dependencies for
options.o--as far as I can tell, these were omitted, and a dependency
on intl.h was put on options.c instead, which makes little sense.

Incidentally, options.h and options.c are not in STAGESTUFF.  I
couldn't think of any reason they need to be, but then I can't think
of any reason that gtyp-gen.h needs to be, but it's there anyhow.  If
options.h and options.c are added to STAGESTUFF, then s-options needs
to be added as well.

Doing a bootstrap on i686-pc-linux-gnu.

OK for mainline if it passes?


2004-01-28  Ian Lance Taylor  <>

	* (options.c options.h): Use stamp file s-options to
	avoid unnecessary rebuilds.
	(options.o): New target listing dependencies.
	(gtyp-gen.h): Use stamp file s-gtyp-gen.
	(STAGESTUFF): Add s-gtyp-gen.

RCS file: /cvs/gcc/gcc/gcc/,v
retrieving revision 1.1234
diff -p -u -r1.1234
---	27 Jan 2004 20:35:50 -0000	1.1234
+++	28 Jan 2004 19:00:44 -0000
@@ -884,7 +884,7 @@ STAGESTUFF = *$(objext) insn-flags.h ins
  insn-attr.h insn-attrtab.c insn-opinit.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 \
- s-output s-recog s-emit s-extract s-peep s-check s-conditions \
+ 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) \
  genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \
@@ -1439,12 +1439,14 @@ s-specs : Makefile
 	$(SHELL) $(srcdir)/move-if-change tmp-specs.h specs.h
 	$(STAMP) s-specs
-options.c: $(lang_opt_files) $(srcdir)/ options.h intl.h
-options.h: $(lang_opt_files) $(srcdir)/ Makefile
+options.c options.h: s-options ; @true
+s-options: $(lang_opt_files) $(srcdir)/ Makefile
 	AWK=$(AWK) $(SHELL) $(srcdir)/ \
                '$(SHELL) $(srcdir)/move-if-change' \
                options.c options.h $(lang_opt_files)
+	$(STAMP) s-options
+options.o: options.c options.h opts.h intl.h
 dumpvers: dumpvers.c
@@ -2076,7 +2078,8 @@ gt-dbxout.h gt-c-common.h gt-c-decl.h gt
 gt-c-pragma.h gtype-c.h gt-input.h gt-cfglayout.h \
 gt-stringpool.h gt-langhooks.h : s-gtype ; @true
-gtyp-gen.h: Makefile
+gtyp-gen.h: s-gtyp-gen ; @true
+s-gtyp-gen: Makefile
 	echo "/* This file is machine generated.  Do not edit.  */" > tmp-gtyp.h
 	echo "static const char *const srcdir = "  >> tmp-gtyp.h
 	echo "\"$(GTFILES_SRCDIR)\"" >> tmp-gtyp.h
@@ -2102,6 +2105,7 @@ gtyp-gen.h: Makefile
 	echo "\"$$l\", "; done >> tmp-gtyp.h
 	echo "NULL};" >> tmp-gtyp.h
 	$(SHELL) $(srcdir)/move-if-change tmp-gtyp.h gtyp-gen.h 
+	$(STAMP) s-gtyp-gen
 s-gtype: gengtype$(build_exeext) $(GTFILES)
 	$(RUN_GEN) ./gengtype

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