]> sourceware.org Git - automake.git/commitdiff
Now that stamp-h's are created by config.status, we don't need to
authorAkim Demaille <akim@epita.fr>
Fri, 26 Oct 2001 09:59:57 +0000 (09:59 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 26 Oct 2001 09:59:57 +0000 (09:59 +0000)
handle them in Makefile's.
* lib/am/remake-hdr.am (%STAMP%): Just run config.status.
* m4/header.m4 (_AM_STAMP): New.
(_AM_CONFIG_HEADER): Use it.

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

index ae2cb7497450181f2d76f6a644489103cda7ab64..e07e84956f39e9a5bf90c0b63f803286bcff12e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-10-26  Akim Demaille  <akim@epita.fr>
+
+       Now that stamp-h's are created by config.status, we don't need to
+       handle them in Makefile's.
+
+       * lib/am/remake-hdr.am (%STAMP%): Just run config.status.
+       * m4/header.m4 (_AM_STAMP): New.
+       (_AM_CONFIG_HEADER): Use it.
+
 2001-10-26  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&generate_makefile, &handle_texinfo_helper)
index af75359453d824f821905e71508def87700b3e90..37fbffaea842464558fb105ff47c879d3768fab5 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
+## Explicitly look in srcdir for benefit of non-GNU makes.
+
+
 %CONFIG_HEADER%: %STAMP%
 ## Recover from removal of CONFIG_HEADER
        @if test ! -f $@; then \
-               rm -f %STAMP%; \
-               $(MAKE) %STAMP%; \
+         rm -f %STAMP%; \
+         $(MAKE) %STAMP%; \
        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
+       @rm -f %STAMP%
        cd $(top_builddir) && $(SHELL) ./config.status %CONFIG_HEADER_FULL%
 
-## 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.
+
 ## SRC_STAMP takes into account a possible subdir where CONFIG_HEADER_IN is
 $(srcdir)/%CONFIG_HEADER_IN%: %MAINTAINER-MODE% $(srcdir)/%SRC_STAMP%.in
 ## Recover from removal of CONFIG_HEADER_IN
        @if test ! -f $@; then \
-               rm -f $(srcdir)/%SRC_STAMP%.in; \
-               $(MAKE) $(srcdir)/%SRC_STAMP%.in; \
+         rm -f $(srcdir)/%SRC_STAMP%.in; \
+         $(MAKE) $(srcdir)/%SRC_STAMP%.in; \
        else :; fi
+
+
 $(srcdir)/%SRC_STAMP%.in: $(top_srcdir)/%CONFIGURE-AC% $(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
index a574c05dba28c6ab7b563eff02e968029f6959e2..63b90e5af9dd244cfafa798f34380948f4af99ce 100644 (file)
 
 AC_PREREQ([2.52])
 
-# serial 5
+# serial 6
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
 # that is generated.  We must strip everything past the first ":",
 # and everything past the last "/".
 
+# _AM_DIRNAME(PATH)
+# -----------------
+# Like AS_DIRNAME, only do it during macro expansion
+AC_DEFUN([_AM_DIRNAME],
+       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
+             m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
+                   m4_if(regexp([$1], [^/.*]), -1,
+                         [.],
+                         patsubst([$1], [^\(/\).*], [\1])),
+                   patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
+             patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
+])# _AM_DIRNAME
+
+
 # The stamp files are numbered to have different names.
 # We could number them on a directory basis, but that's additional
 # complications, let's have a unique counter.
-m4_define([_AM_Config_Header_Index], [0])
+m4_define([_AM_STAMP_Count], [0])
+
+
+# _AM_STAMP(HEADER)
+# -----------------
+# The name of the stamp file for HEADER.
+AC_DEFUN([_AM_STAMP],
+[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
+AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
+                               [:.*])))/stamp-h[]_AM_STAMP_Count])
 
 
 # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
 # ------------------------------------------------------------
+# We used to try to get a real timestamp in stamp-h.  But the fear is that
+# that will cause unnecessary cvs conflicts.
 AC_DEFUN([_AM_CONFIG_HEADER],
-[m4_pushdef([_AM_Dest], patsubst([$1], [:.*]))
-m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
-# Add the stamp file to the list of files AC keeps track of,
-# along with our hook
+[# Add the stamp file to the list of files AC keeps track of,
+# along with our hook.
 AC_CONFIG_HEADERS([$1],
                   [# update the timestamp
-echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
+echo 'timestamp for $1' >"_AM_STAMP([$1])"
 $2],
                   [$3])
-m4_popdef([_AM_Dest])
-])# # _AM_CONFIG_HEADER
+])# _AM_CONFIG_HEADER
 
 
 # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
 # --------------------------------------------------------------
 AC_DEFUN([AM_CONFIG_HEADER],
 [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
-]) # AM_CONFIG_HEADER
-
-
-# _AM_DIRNAME(PATH)
-# -----------------
-# Like AS_DIRNAME, only do it during macro expansion
-AC_DEFUN([_AM_DIRNAME],
-       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
-             m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
-                   m4_if(regexp([$1], [^/.*]), -1,
-                         [.],
-                         patsubst([$1], [^\(/\).*], [\1])),
-                   patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
-             patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
-]) # _AM_DIRNAME
+])# AM_CONFIG_HEADER
This page took 0.046477 seconds and 5 git commands to generate.