libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: 81-gary-catch-unexpanded-LT_-macros.patch


From: Gary V. Vaughan
Subject: FYI: 81-gary-catch-unexpanded-LT_-macros.patch
Date: Fri, 06 Feb 2004 14:59:52 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

IApplied to HEAD:

ndex: ChangeLog
from  Gary V. Vaughan  <address@hidden>
        * m4/libtool.m4 (AC_LIBTOOL_SETUP): Catch unexpanded macros with
        beginning with LT_ and _LT_.
        * configure.ac (LT_MAJOR, LT_MINOR, LT_MICRO, LT_ALPHA): Renamed
        to lt_major, lt_minor, lt_micro, lt_alpha to save triggering the
        unexpanded macros error.

Index: configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/configure.ac,v
retrieving revision 1.33
diff -u -p -u -r1.33 configure.ac
- --- configure.ac 27 Jan 2004 12:38:47 -0000 1.33
+++ configure.ac 6 Feb 2004 14:38:02 -0000
@@ -48,41 +48,41 @@ dnl AC_CONFIG_FILES([tests/atlocal])
~ #     http://www.gnu.org/software/libtool/contribute.html

~ # First we break the version number up into its constituent parts.
- -LT_MAJOR=`echo "AC_PACKAGE_VERSION" | sed ['s,\..*$,,g']`
- -LT_MINOR=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.\([0-9]*\).*$,\1,']`
- -LT_MICRO=`echo "AC_PACKAGE_VERSION" | sed
['s,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,']`
- -LT_ALPHA=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9.]*,,']`
+lt_major=`echo "AC_PACKAGE_VERSION" | sed ['s,\..*$,,g']`
+lt_minor=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.\([0-9]*\).*$,\1,']`
+lt_micro=`echo "AC_PACKAGE_VERSION" | sed
['s,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,']`
+lt_alpha=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9.]*,,']`

- -test "$LT_MINOR" = "AC_PACKAGE_VERSION" && LT_MINOR=0
- -test "$LT_MICRO" = "AC_PACKAGE_VERSION" && LT_MICRO=""
+test "$lt_minor" = "AC_PACKAGE_VERSION" && lt_minor=0
+test "$lt_micro" = "AC_PACKAGE_VERSION" && lt_micro=""

~ # Then we try to work out what the release before this one would have been
~ # numbered.  The only time we come unstuck is when this is the first release
- -# from a stable branch (LT_MICRO=LT_ALPHA=""), so LASTRELEASE is the last
+# from a stable branch (lt_micro=lt_alpha=""), so LASTRELEASE is the last
~ # release from the old stable branch, and we don't know what version that
~ # was, so leave it unset so that the Makefile can complain.
- -case $LT_ALPHA in
+case $lt_alpha in
~   [[ab]])
- -    case $LT_MICRO in
+    case $lt_micro in
~       [.[01]])
- -     LASTRELEASE="$LT_MAJOR.$LT_MINOR" ;;
+       LASTRELEASE="$lt_major.$lt_minor" ;;
~       *)
- -     LASTRELEASE="$LT_MAJOR.$LT_MINOR$LT_MICRO" ;;
+       LASTRELEASE="$lt_major.$lt_minor$lt_micro" ;;
~     esac
~     ;;
~   [[cegikmoqsuwy]])
~     LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'c-y' 'b-w'` ;;
~   [[dfhjlnprtvxz]])
~     LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'd-z' 'b-x'` ;;
- -  *) # No LT_ALPHA component
- -    case $LT_MICRO in
+  *) # No lt_alpha component
+    case $lt_micro in
~       .0)
~       LASTRELEASE="" ;;
~       .1)
- -        LASTRELEASE="$LT_MAJOR.$LT_MINOR" ;;
+        LASTRELEASE="$lt_major.$lt_minor" ;;
~       .*)
- -     lt_micro_value=`echo $LT_MICRO | sed 's,^\.,,'`
- -     LASTRELEASE="$LT_MAJOR.$LT_MINOR.`expr $lt_micro_value - 1`" ;;
+       lt_micro_value=`echo $lt_micro | sed 's,^\.,,'`
+       LASTRELEASE="$lt_major.$lt_minor.`expr $lt_micro_value - 1`" ;;
~       *)
~       LASTRELEASE="" ;;
~     esac
@@ -94,7 +94,7 @@ AC_SUBST([LASTRELEASE])
~ # 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=
- -case $LT_ALPHA in
+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])
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.39
diff -u -p -u -r1.39 libtool.m4
- --- m4/libtool.m4 6 Feb 2004 14:12:10 -0000 1.39
+++ m4/libtool.m4 6 Feb 2004 14:38:16 -0000
@@ -93,6 +93,9 @@ test -f "$ltmain" || ltmain="$ac_aux_dir
~ # ----------------
~ AC_DEFUN([AC_LIBTOOL_SETUP],
~ [AC_PREREQ(2.58)dnl We use AC_INCLUDES_DEFAULT
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW)$])dnl
~ AC_REQUIRE([LTSUGAR_VERSION])dnl
~ AC_REQUIRE([AC_CANONICAL_HOST])dnl
~ AC_REQUIRE([AC_CANONICAL_BUILD])dnl



- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://www.oranda.demon.co.uk
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAI6voFRMICSmD1gYRAi0aAJ0ciFVpnWPzKuu8DHmHmR3DYoe/UgCeIpjU
TYdH7qtIQl6dSalosaaBq/A=
=8agc
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]