]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* Makefile.am (TSDEPS_DIST): dist-time dependencies for timestamps
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Fri, 22 Jan 1999 12:21:05 +0000 (12:21 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Fri, 22 Jan 1999 12:21:05 +0000 (12:21 +0000)
(timestamps, update-timestamps): check whether TSDEPS_DIST are
up-to-date and update ltconfig and ltmain.sh if needed
(ltconfig, ltmain.sh): depend on TSDEPS; replace @TIMESTAMP@ with
the Date tag in the ChangeLog
(TSDEPS): empty unless overridden by update-timestamps
* ltconfig.in, ltmain.in (TIMESTAMP): append timestamp to most
references to VERSION

ChangeLog
Makefile.am
ltconfig.in
ltmain.in

index 680be40e3cdc0f77bc97d6223add784abc508c42..3755b01d2cfac22ed5074902b03d1624fa95f6f8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+1999-01-22  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * Makefile.am (TSDEPS_DIST): dist-time dependencies for timestamps
+       (timestamps, update-timestamps): check whether TSDEPS_DIST are
+       up-to-date and update ltconfig and ltmain.sh if needed
+       (ltconfig, ltmain.sh): depend on TSDEPS; replace @TIMESTAMP@ with
+       the Date tag in the ChangeLog
+       (TSDEPS): empty unless overridden by update-timestamps
+       * ltconfig.in, ltmain.in (TIMESTAMP): append timestamp to most
+       references to VERSION
+
 1999-01-22  Gary V. Vaughan  <gvaughan@oranda.demon.co.uk>
 
        * ltmain.in (ild): Revert the change which allowed libtool to
@@ -3561,3 +3572,5 @@ Thu May 28 18:59:08 1998  Ian Lance Taylor  <ian@cygnus.com>
 1996-03-15  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * For historical reasons: this is when I started writing libtool.
+
+       $Date$
index 161d14b11311ac205e18d79d3db494a7f0e3f82c..b63ccd6477f3cb0d58ec3e0513d38d21de664611 100644 (file)
@@ -45,20 +45,39 @@ libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
        CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status
        chmod +x libtoolize
 
-# Do line number substitution, as well as PACKAGE and VERSION.
+# TSDEPS will be defined to TSDEPS_DIST at `make dist' time
+TSDEPS =
+TSDEPS_DIST = ChangeLog libtool.m4
+
+.PHONY: timestamps update-timestamps
+timestamps distdir: update-timestamps
+update-timestamps:
+       @if (cd $(srcdir) && test -d CVS && \
+           cvs -n update $(TSDEPS_DIST) | grep '^M'); then \
+               echo "Cannot make dist before commit"; exit 1; else :; fi
+       $(MAKE) TSDEPS="$(TSDEPS_DIST)" $(srcdir)/ltconfig $(srcdir)/ltmain.sh
+
+# Do line number substitution, as well as PACKAGE, VERSION and TIMESTAMP.
 # Line numbering transliterated from a section in autoconf (Autoconf 2.12).
-$(srcdir)/ltconfig: $(srcdir)/ltconfig.in $(top_srcdir)/configure.in
+$(srcdir)/ltconfig: $(srcdir)/ltconfig.in $(top_srcdir)/configure.in $(TSDEPS)
        rm -f ltconfig.T
+       date=`sed 's/.*\$$Date$$]*\)\$$.*/ (\1)/;t;d' \
+               < $(srcdir)/ChangeLog` && \
        $(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig.in | \
          sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
-             -e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' > ltconfig.T
+             -e "s/@""TIMESTAMP@/$$date/" \
+             -e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' \
+               > ltconfig.T
        chmod +x ltconfig.T
        mv -f ltconfig.T $@ || \
        (rm -f $@ && cp ltconfig.T $@ && rm -f ltconfig.T)
 
-$(srcdir)/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in
+$(srcdir)/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(TSDEPS)
        rm -f ltmain.shT
-       sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' $(srcdir)/ltmain.in > ltmain.shT
+       date=`sed 's/.*\$$Date$$]*\)\$$.*/ (\1)/;t;d' \
+               < $(srcdir)/ChangeLog` && \
+       sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
+           -e "s/@""TIMESTAMP@/$$date/" $(srcdir)/ltmain.in > ltmain.shT
        mv -f ltmain.shT $@ || \
        (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT)
 
index 1e12693804008b03352019a73b4799078c0ad81b..5b93f339a256e371bbeb202330a9580ff40887d0 100755 (executable)
@@ -160,6 +160,7 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
 PROGRAM=ltconfig
 PACKAGE=@PACKAGE@
 VERSION=@VERSION@
+TIMESTAMP="@TIMESTAMP@"
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
 rm="rm -f"
@@ -262,7 +263,7 @@ EOM
   --output | -o) prev=ofile ;;
   --output=*) ofile="$optarg" ;;
 
-  --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
+  --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
 
   --with-gcc) with_gcc=yes ;;
   --with-gnu-ld) with_gnu_ld=yes ;;
@@ -1939,7 +1940,7 @@ case "$ltmain" in
 #! $SHELL
 
 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION)
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
 #
 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
@@ -1990,7 +1991,7 @@ EOF
   $rm "$cfgfile"
   cat <<EOF > "$cfgfile"
 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION)
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 EOF
   ;;
 esac
@@ -2007,7 +2008,7 @@ cat <<EOF >> "$cfgfile"
 # debugging $progname, is in ./config.log if it exists.
 
 # The version of $progname that generated this script.
-LTCONFIG_VERSION=$VERSION
+LTCONFIG_VERSION="$VERSION"
 
 # Shell to use when invoking shell scripts.
 SHELL=$LTSHELL
index 24fe983b130e4e32824568250911f168af258a22..fa54551147194b4977f47e2556875aebae09c7a9 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -50,6 +50,7 @@ modename="$progname"
 PROGRAM=ltmain.sh
 PACKAGE=@PACKAGE@
 VERSION=@VERSION@
+TIMESTAMP="@TIMESTAMP@"
 
 default_mode=
 help="Try \`$progname --help' for more information."
@@ -134,7 +135,7 @@ do
     ;;
 
   --version)
-    echo "$PROGRAM (GNU $PACKAGE) $VERSION"
+    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
     exit 0
     ;;
 
@@ -2112,7 +2113,7 @@ EOF
 
          $echo > "$objdir/$dlsyms" "\
 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
 
 #ifdef __cplusplus
 extern \"C\" {
@@ -2343,7 +2344,7 @@ static const void *lt_preloaded_setup() {
 #! $SHELL
 
 # $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
 #
 # The $output program cannot be directly executed until all the libtool
 # libraries that it depends on are installed.
@@ -2547,7 +2548,7 @@ fi\
       if test -z "$run"; then
        $echo > $output "\
 # $output - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
 
 # The name that we can dlopen(3).
 dlname='$dlname'