From 0d232bc3723f9d02d2206a6374e40d99e1a2135a Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 17 Apr 1999 19:44:50 +0000 Subject: [PATCH] * automake.in: Create stamps for headers in appropriate directories, even if the input file lives in a different place. * remake-hdr.am: Likewise. --- ChangeLog | 6 ++++++ automake.in | 3 ++- lib/am/remake-hdr.am | 15 ++++++++------- remake-hdr.am | 15 ++++++++------- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0c67918..34e0296f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-04-17 Erez Zadok + + * automake.in: Create stamps for headers in appropriate + directories, even if the input file lives in a different place. + * remake-hdr.am: Likewise. + 1999-04-16 Tom Tromey From Brian Ford: diff --git a/automake.in b/automake.in index 43b7dc3c..7105b616 100755 --- a/automake.in +++ b/automake.in @@ -3253,10 +3253,11 @@ sub handle_configure $xform .= 's,\@CONFIG_HEADER_FULL\@,' . "${one_fullname}" . ',;'; $xform .= 's,\@STAMP\@,' . "${stamp_dir}${stamp_name}" . ',g;'; + local ($out_dir) = &dirname ($ch_sans_dir); + $xform .= 's,\@SRC_STAMP\@,' . "${out_dir}/${stamp_name}" . ',g;'; $output_rules .= &file_contents_with_transform ($xform, 'remake-hdr'); - local ($out_dir) = &dirname ($ch_sans_dir); &create ("${relative_dir}/${out_dir}/${stamp_name}.in"); &require_file_with_conf_line ($config_header_line, $FOREIGN, "${out_dir}/${stamp_name}.in"); diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am index d114c85b..5b11e891 100644 --- a/lib/am/remake-hdr.am +++ b/lib/am/remake-hdr.am @@ -35,19 +35,20 @@ ## 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 +## SRC_STAMP takes into account a possible subdir where CONFIG_HEADER_IN is +$(srcdir)/@CONFIG_HEADER_IN@: @MAINTAINER_MODE_TRUE@$(srcdir)/@SRC_STAMP@.in ## Recover from removal of CONFIG_HEADER_IN @if test ! -f $@; then \ - rm -f $(srcdir)/@STAMP@.in; \ - $(MAKE) $(srcdir)/@STAMP@.in; \ + rm -f $(srcdir)/@SRC_STAMP@.in; \ + $(MAKE) $(srcdir)/@SRC_STAMP@.in; \ else :; fi -$(srcdir)/@STAMP@.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@ - @rm -f $(srcdir)/@STAMP@.in $(srcdir)/@STAMP@.inT +$(srcdir)/@SRC_STAMP@.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@ + @rm -f $(srcdir)/@SRC_STAMP@.in $(srcdir)/@SRC_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@.inT 2> /dev/null + @echo timestamp > $(srcdir)/@SRC_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 + @mv $(srcdir)/@SRC_STAMP@.inT $(srcdir)/@SRC_STAMP@.in diff --git a/remake-hdr.am b/remake-hdr.am index d114c85b..5b11e891 100644 --- a/remake-hdr.am +++ b/remake-hdr.am @@ -35,19 +35,20 @@ ## 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 +## SRC_STAMP takes into account a possible subdir where CONFIG_HEADER_IN is +$(srcdir)/@CONFIG_HEADER_IN@: @MAINTAINER_MODE_TRUE@$(srcdir)/@SRC_STAMP@.in ## Recover from removal of CONFIG_HEADER_IN @if test ! -f $@; then \ - rm -f $(srcdir)/@STAMP@.in; \ - $(MAKE) $(srcdir)/@STAMP@.in; \ + rm -f $(srcdir)/@SRC_STAMP@.in; \ + $(MAKE) $(srcdir)/@SRC_STAMP@.in; \ else :; fi -$(srcdir)/@STAMP@.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@ - @rm -f $(srcdir)/@STAMP@.in $(srcdir)/@STAMP@.inT +$(srcdir)/@SRC_STAMP@.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@ + @rm -f $(srcdir)/@SRC_STAMP@.in $(srcdir)/@SRC_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@.inT 2> /dev/null + @echo timestamp > $(srcdir)/@SRC_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 + @mv $(srcdir)/@SRC_STAMP@.inT $(srcdir)/@SRC_STAMP@.in -- 2.43.5