From 3b6142f95eccf1e412820b8f0bf6ffae3ee12526 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 22 Jan 1999 12:21:05 +0000 Subject: [PATCH] * 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 --- ChangeLog | 13 +++++++++++++ Makefile.am | 29 ++++++++++++++++++++++++----- ltconfig.in | 9 +++++---- ltmain.in | 9 +++++---- 4 files changed, 47 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 680be40e3..3755b01d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +1999-01-22 Alexandre Oliva + + * 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 * ltmain.in (ild): Revert the change which allowed libtool to @@ -3561,3 +3572,5 @@ Thu May 28 18:59:08 1998 Ian Lance Taylor 1996-03-15 Gordon Matzigkeit * For historical reasons: this is when I started writing libtool. + + $Date$ diff --git a/Makefile.am b/Makefile.am index 161d14b11..b63ccd647 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/ltconfig.in b/ltconfig.in index 1e1269380..5b93f339a 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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 < "$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 <> "$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 diff --git a/ltmain.in b/ltmain.in index 24fe983b1..fa5455114 100644 --- 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' -- 2.47.2