and just rename it after, so that the timestamps will be correct.
Reported by Marc Horowitz <marc@mit.edu>
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>
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
$(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
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
$(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