Message ID | 72D13929-C538-4DCA-AA00-A56AAE31AC22@comcast.net |
---|---|
State | New |
Headers | show |
Hello Mike, * Mike Stump wrote on Sun, Feb 13, 2011 at 01:37:48PM CET: > * config/t-darwin (build/slashify1): Harden against rebuilds. > * config/slashify.c: Nix parms to quite the build. > > cp: > * (build/slashify): Harden against rebuilds. > > --- cp/Make-lang.in (revision 170104) > +++ cp/Make-lang.in (working copy) > @@ -333,15 +333,17 @@ > > cp/lex.o: $(objdir)/objcp/plugin/lex.h c-family/c-objc.h > > -build/slashify:: $(srcdir)/config/slashify.c > - $(COMPILER_FOR_BUILD) $(srcdir)/config/slashify.c -o $@ > +# Would like to get rid of the #, but we always rebuild the checksum > +# if we do > +build/slashify: # $(srcdir)/config/slashify.c > + $(COMPILER_FOR_BUILD) $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) $(srcdir)/config/slashify.c -o $@ > > -$(objdir)/objcp/plugin/parser.h: $(srcdir)/objcp/plugin/parser.h | build/slashify > +$(objdir)/objcp/plugin/parser.h: $(srcdir)/objcp/plugin/parser.h build/slashify This change doesn't look right. The order-only dependency should be just the right thing to avoid unnecessary rebuilds of parser.h when slashify is recreated but the parser.h in the source tree hasn't changed. Which make version and what system are you using where this doesn't work? (Aside, both old and new versions won't work for an in-tree build, and both lack a few $(build_exeext) additions.) > test -d objcp || mkdir objcp > test -d objcp/plugin || mkdir objcp/plugin > build/slashify < $< > $@ > > -$(objdir)/objcp/plugin/lex.h: $(srcdir)/objcp/plugin/lex.h | build/slashify > +$(objdir)/objcp/plugin/lex.h: $(srcdir)/objcp/plugin/lex.h build/slashify > test -d objcp || mkdir objcp > test -d objcp/plugin || mkdir objcp/plugin > build/slashify < $< > $@ > Index: config/t-darwin > =================================================================== > --- config/t-darwin (revision 170103) > +++ config/t-darwin (working copy) > @@ -17,18 +17,18 @@ > # along with GCC; see the file COPYING3. If not see > # <http://www.gnu.org/licenses/>. > > -build/slashify:: $(srcdir)/config/slashify.c > - $(COMPILER_FOR_BUILD) $(srcdir)/config/slashify.c -o $@ > +build/slashify1: $(srcdir)/config/slashify.c > + $(COMPILER_FOR_BUILD) $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) $(srcdir)/config/slashify.c -o $@ > > $(srcdir)/config/darwin.h: config/darwin.h.rebuild > > -config/darwin.h.rebuild: build/slashify > +config/darwin.h.rebuild: build/slashify1 > @if [ ! -e $(srcdir)/config/darwin.h \ > -o $(srcdir)/config/darwin.h -nt config/darwin.h ]; then \ > { test -d config || mkdir config; } && \ > cp -p $(srcdir)/config/darwin-sections.def \ > config/darwin-sections.def && \ > - build/slashify < $(srcdir)/config/darwin.h >config/darwin.h; \ > + build/slashify1 < $(srcdir)/config/darwin.h >config/darwin.h; \ > fi > > darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ Thanks, Ralf
Index: cp/Make-lang.in =================================================================== --- cp/Make-lang.in (revision 170104) +++ cp/Make-lang.in (working copy) @@ -333,15 +333,17 @@ cp/lex.o: $(objdir)/objcp/plugin/lex.h c-family/c-objc.h -build/slashify:: $(srcdir)/config/slashify.c - $(COMPILER_FOR_BUILD) $(srcdir)/config/slashify.c -o $@ +# Would like to get rid of the #, but we always rebuild the checksum +# if we do +build/slashify: # $(srcdir)/config/slashify.c + $(COMPILER_FOR_BUILD) $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) $(srcdir)/config/slashify.c -o $@ -$(objdir)/objcp/plugin/parser.h: $(srcdir)/objcp/plugin/parser.h | build/slashify +$(objdir)/objcp/plugin/parser.h: $(srcdir)/objcp/plugin/parser.h build/slashify test -d objcp || mkdir objcp test -d objcp/plugin || mkdir objcp/plugin build/slashify < $< > $@ -$(objdir)/objcp/plugin/lex.h: $(srcdir)/objcp/plugin/lex.h | build/slashify +$(objdir)/objcp/plugin/lex.h: $(srcdir)/objcp/plugin/lex.h build/slashify test -d objcp || mkdir objcp test -d objcp/plugin || mkdir objcp/plugin build/slashify < $< > $@ Index: config/t-darwin =================================================================== --- config/t-darwin (revision 170103) +++ config/t-darwin (working copy) @@ -17,18 +17,18 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -build/slashify:: $(srcdir)/config/slashify.c - $(COMPILER_FOR_BUILD) $(srcdir)/config/slashify.c -o $@ +build/slashify1: $(srcdir)/config/slashify.c + $(COMPILER_FOR_BUILD) $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) $(srcdir)/config/slashify.c -o $@ $(srcdir)/config/darwin.h: config/darwin.h.rebuild -config/darwin.h.rebuild: build/slashify +config/darwin.h.rebuild: build/slashify1 @if [ ! -e $(srcdir)/config/darwin.h \ -o $(srcdir)/config/darwin.h -nt config/darwin.h ]; then \ { test -d config || mkdir config; } && \ cp -p $(srcdir)/config/darwin-sections.def \ config/darwin-sections.def && \ - build/slashify < $(srcdir)/config/darwin.h >config/darwin.h; \ + build/slashify1 < $(srcdir)/config/darwin.h >config/darwin.h; \ fi darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ Index: config/slashify.c =================================================================== --- config/slashify.c (revision 170103) +++ config/slashify.c (working copy) @@ -25,9 +25,9 @@ #include <stdio.h> -extern int main (int, char **); +extern int main (void); -int main (int argc, char **argv) { +int main (void) { int c,c1; int saw_start = 0; while ((c=getchar ()) != EOF) {