]> sourceware.org Git - automake.git/commitdiff
* remake-hdr.am: Create the stamp file before the header file,
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Sat, 10 Apr 1999 01:41:18 +0000 (01:41 +0000)
committerAlexandre Oliva <oliva@dcc.unicamp.br>
Sat, 10 Apr 1999 01:41:18 +0000 (01:41 +0000)
and just rename it after, so that the timestamps will be correct.
Reported by Marc Horowitz <marc@mit.edu>

ChangeLog
lib/am/remake-hdr.am
remake-hdr.am

index 4d40113fef3513d606716ba47d37628a8a2a5d11..bfbc408a8624478f0e379a099c34c31f06460598 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 1999-04-10  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * 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 <marc@mit.edu>
+
        * automake.in (lang_yacc_finish): Generate and dist a `.h' for a
        `.y' iff YFLAGS or AM_YFLAGS contain `-d'.
        Reported by Jim Meyering <meyering@ascend.com>
index 90712da01b27fea69109820f95b84f4fa689be33..d114c85b4750cd43e86290bf203f0de9f6b3d550 100644 (file)
        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
index 90712da01b27fea69109820f95b84f4fa689be33..d114c85b4750cd43e86290bf203f0de9f6b3d550 100644 (file)
        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
This page took 0.031814 seconds and 5 git commands to generate.