]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix a long-standing bug where macro_version was always empty in
authorGary V. Vaughan <gary@gnu.org>
Wed, 28 Jul 2004 16:14:01 +0000 (16:14 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 28 Jul 2004 16:14:01 +0000 (16:14 +0000)
the generated m4/ltversion.m4.  Except for CVS revisions:

* ltmain.in (package_revision): Don't try to deduce it from
TIMESTAMP, since that is empty for release versions; simply
substitute it...
* configure.ac (package_revision): ...from here, having
precalculated it before resetting TIMESTAMP for release versions.
* bootstrap: Force regeneration of m4/ltversion.m4, but retain
timestamps if there is no change to the content.

ChangeLog
bootstrap
configure.ac
ltmain.in

index 6eb4a7501ef6d3905f279bb98e03bfa384db7d44..7894606674dc207efa1a6a5fc5094a3ccaef2d34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-07-28  Gary V. Vaughan  <gary@gnu.org>
+
+       Fix a long-standing bug where macro_version was always empty in
+       the generated m4/ltversion.m4.  Except for CVS revisions:
+
+       * ltmain.in (package_revision): Don't try to deduce it from
+       TIMESTAMP, since that is empty for release versions; simply
+       substitute it...
+       * configure.ac (package_revision): ...from here, having
+       precalculated it before resetting TIMESTAMP for release versions.
+       * bootstrap: Force regeneration of m4/ltversion.m4, but retain
+       timestamps if there is no change to the content.
+
 2004-07-28  Gary V. Vaughan  <gary@gnu.org>
 
        To take full advantage of this, libtool must be bootstrapped with
index e3fea810a1ff02026a0a7fa25446a94c5be7d760..3b3fecbb707e68aca255d90ab8c5f64d0c3c7134 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -44,7 +44,18 @@ if test -z "$reconfdirs"; then
   reconfdirs=". `ls -1d tests/*demo tests/*demo[0-9]`"
 fi
 
-make top_srcdir=. -f Makefile.am ./m4/ltversion.m4
+# Extract the version number from the configure.ac file, and make
+# sure that ltversion.m4 is up to date (preserving the timestamp
+# if possible).
+mv ./m4/ltversion.m4 .ltversion.m4T
+set -- `sed '/AC_INIT/{s/[][,]//g; p;};d' configure.ac`
+make top_srcdir=. VERSION="$2" -f Makefile.am ./m4/ltversion.m4
+if cmp -s ./m4/ltversion.m4 .ltversion.m4T; then
+  rm -f ./m4/ltversion.m4
+  mv .ltversion.m4T ./m4/ltversion.m4
+else
+  rm -f .ltversion.m4T
+fi
 
 for file in $fakes; do
   cat > $file <<'EOF'
index 73a1b68489b7ed5bc7696f13c343421b4a846248..50c85b631fe267b1639bd00d733e38e295575cad 100644 (file)
@@ -93,15 +93,17 @@ AC_SUBST([LASTRELEASE])
 # This is a sanity check so we can see which version is used in bug reports.
 # It is assumed that we only want to see the date extension for cvs libtool
 # versions (i.e. "odd" letters) and not actual alpha releases.
-TIMESTAMP=
+TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp < ${srcdir}/ChangeLog`
+package_revision=`( set $TIMESTAMP; echo $1; )`
 case $lt_alpha in
-  [[acegikmoqsuwy]])
-    TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp < ${srcdir}/ChangeLog`
-    AS_BOX([Configuring AC_PACKAGE_TARNAME (Build:$TIMESTAMP) AC_PACKAGE_VERSION])
-    echo
+  [[bdfhjlnprtvxz]])
+    TIMESTAMP=
     ;;
 esac
+AS_BOX([Configuring AC_PACKAGE_TARNAME${TIMESTAMP:+" (Build:$TIMESTAMP)"} AC_PACKAGE_VERSION])
+echo
 AC_SUBST([TIMESTAMP])
+AC_SUBST([package_revision])
 
 
 ## ------------------------ ##
@@ -200,6 +202,6 @@ AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_AC_TAGVAR(compiler, RC)"])
 ## -------- ##
 ## Outputs. ##
 ## -------- ##
-AC_CONFIG_FILES([Makefile libltdl/Makefile libltdl/loaders/Makefile 
+AC_CONFIG_FILES([Makefile libltdl/Makefile libltdl/loaders/Makefile
                doc/Makefile tests/Makefile])
 AC_OUTPUT
index 085a255e4dba891c06167a7a739a865389375614..6afe1175dcf89d69ed0a59c0d140bbfaecce1191 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -59,6 +59,7 @@ PROGRAM=ltmain.sh
 PACKAGE=@PACKAGE@
 VERSION=@VERSION@
 TIMESTAMP="@TIMESTAMP@"
+package_revision=@package_revision@
 
 # Check that we have a working $echo.
 if test "X$1" = X--no-reexec; then
@@ -93,20 +94,19 @@ rm="rm -f"
 
 # Ensure that we are using m4 macros, and libtool script from the same
 # release of libtool.
-package_revision=`( set $TIMESTAMP; echo $1; )`
 if test "$package_revision" != "$macro_revision"; then
   if test "$VERSION" != "$macro_version"; then
     if test -z "$macro_version"; then
       cat >&2 <<_LT_EOF
 $progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this AC_PROG_LIBTOOL comes from an older release.
+$progname: definition of this LT_INIT comes from an older release.
 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
 $progname: and run autoconf again.
 _LT_EOF
     else
       cat >&2 <<_LT_EOF
 $progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this AC_PROG_LIBTOOL comes from $PACKAGE $macro_version.
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
 $progname: and run autoconf again.
 _LT_EOF
@@ -114,8 +114,7 @@ _LT_EOF
   else
     cat >&2 <<_LT_EOF
 $progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition used by this AC_PROG_LIBTOOL comes from revision
-$progname: $macro_revision.
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
 $progname: of $PACKAGE $VERSION and run autoconf again.
 _LT_EOF