From: Alexandre Oliva Date: Sat, 10 Apr 1999 01:41:18 +0000 (+0000) Subject: * remake-hdr.am: Create the stamp file before the header file, X-Git-Tag: last-merge-into-user-dep-gen-branch~29 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=041180512525d8bcbec557c1655874b0710e2d54;p=automake.git * remake-hdr.am: Create the stamp file before the header file, and just rename it after, so that the timestamps will be correct. Reported by Marc Horowitz --- diff --git a/ChangeLog b/ChangeLog index 4d40113f..bfbc408a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 1999-04-10 Alexandre Oliva + * remake-hdr.am: Create the stamp file before the header file, + and just rename it after, so that the timestamps will be correct. + Reported by Marc Horowitz + * automake.in (lang_yacc_finish): Generate and dist a `.h' for a `.y' iff YFLAGS or AM_YFLAGS contain `-d'. Reported by Jim Meyering diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am index 90712da0..d114c85b 100644 --- a/lib/am/remake-hdr.am +++ b/lib/am/remake-hdr.am @@ -23,12 +23,17 @@ else :; fi ## Explicitly look in srcdir for benefit of non-GNU makes. @STAMP@: $(srcdir)/@CONFIG_HEADER_IN@ $(top_builddir)/config.status + @rm -f @STAMP@ @STAMP@T +## We used to try to get a real timestamp here. But the fear is that +## that will cause unnecessary cvs conflicts + @echo timestamp > @STAMP@T 2> /dev/null cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=@CONFIG_HEADER_FULL@ \ $(SHELL) ./config.status -## We used to try to get a real timestamp here. But the fear is that -## that will cause unnecessary cvs conflicts - @echo timestamp > @STAMP@ 2> /dev/null +## Creating the timestamp first, and moving it later, helps ensure that +## it will be older than the header file, avoiding needless triggering +## of the rebuild rule. + @mv @STAMP@T @STAMP@ ## Explicitly look in srcdir for benefit of non-GNU makes. $(srcdir)/@CONFIG_HEADER_IN@: @MAINTAINER_MODE_TRUE@$(srcdir)/@STAMP@.in ## Recover from removal of CONFIG_HEADER_IN @@ -37,7 +42,12 @@ $(srcdir)/@CONFIG_HEADER_IN@: @MAINTAINER_MODE_TRUE@$(srcdir)/@STAMP@.in $(MAKE) $(srcdir)/@STAMP@.in; \ else :; fi $(srcdir)/@STAMP@.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@ - cd $(top_srcdir) && $(AUTOHEADER) + @rm -f $(srcdir)/@STAMP@.in $(srcdir)/@STAMP@.inT ## We used to try to get a real timestamp here. But the fear is that ## that will cause unnecessary cvs conflicts - @echo timestamp > $(srcdir)/@STAMP@.in 2> /dev/null + @echo timestamp > $(srcdir)/@STAMP@.inT 2> /dev/null + cd $(top_srcdir) && $(AUTOHEADER) +## Creating the timestamp first, and moving it later, helps ensure that +## it will be older than the header file, avoiding needless triggering +## of the rebuild rule. + @mv $(srcdir)/@STAMP@.inT $(srcdir)/@STAMP@.in diff --git a/remake-hdr.am b/remake-hdr.am index 90712da0..d114c85b 100644 --- a/remake-hdr.am +++ b/remake-hdr.am @@ -23,12 +23,17 @@ else :; fi ## Explicitly look in srcdir for benefit of non-GNU makes. @STAMP@: $(srcdir)/@CONFIG_HEADER_IN@ $(top_builddir)/config.status + @rm -f @STAMP@ @STAMP@T +## We used to try to get a real timestamp here. But the fear is that +## that will cause unnecessary cvs conflicts + @echo timestamp > @STAMP@T 2> /dev/null cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=@CONFIG_HEADER_FULL@ \ $(SHELL) ./config.status -## We used to try to get a real timestamp here. But the fear is that -## that will cause unnecessary cvs conflicts - @echo timestamp > @STAMP@ 2> /dev/null +## Creating the timestamp first, and moving it later, helps ensure that +## it will be older than the header file, avoiding needless triggering +## of the rebuild rule. + @mv @STAMP@T @STAMP@ ## Explicitly look in srcdir for benefit of non-GNU makes. $(srcdir)/@CONFIG_HEADER_IN@: @MAINTAINER_MODE_TRUE@$(srcdir)/@STAMP@.in ## Recover from removal of CONFIG_HEADER_IN @@ -37,7 +42,12 @@ $(srcdir)/@CONFIG_HEADER_IN@: @MAINTAINER_MODE_TRUE@$(srcdir)/@STAMP@.in $(MAKE) $(srcdir)/@STAMP@.in; \ else :; fi $(srcdir)/@STAMP@.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@ - cd $(top_srcdir) && $(AUTOHEADER) + @rm -f $(srcdir)/@STAMP@.in $(srcdir)/@STAMP@.inT ## We used to try to get a real timestamp here. But the fear is that ## that will cause unnecessary cvs conflicts - @echo timestamp > $(srcdir)/@STAMP@.in 2> /dev/null + @echo timestamp > $(srcdir)/@STAMP@.inT 2> /dev/null + cd $(top_srcdir) && $(AUTOHEADER) +## Creating the timestamp first, and moving it later, helps ensure that +## it will be older than the header file, avoiding needless triggering +## of the rebuild rule. + @mv $(srcdir)/@STAMP@.inT $(srcdir)/@STAMP@.in