diff options
author | Alexandre Oliva <oliva@dcc.unicamp.br> | 1999-04-10 01:41:19 +0000 |
---|---|---|
committer | Alexandre Oliva <oliva@dcc.unicamp.br> | 1999-04-10 01:41:19 +0000 |
commit | 6db55adb1d8cbd763d4f8085c800a94934b1b1a5 (patch) | |
tree | 8e61b4a6063fbcdd4ab0226ebfcf1e43133cc550 /lib/am/remake-hdr.am | |
parent | f1272c682e69f9d21f71d14505b07c4bbeef9d9c (diff) | |
download | automake-6db55adb1d8cbd763d4f8085c800a94934b1b1a5.tar.gz |
* 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>
Diffstat (limited to 'lib/am/remake-hdr.am')
-rw-r--r-- | lib/am/remake-hdr.am | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am index 90712da01..d114c85b4 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 |