libtool-patches
[Top][All Lists]
Advanced

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

Re: Print Libtool project URL in program --help output.


From: Ralf Wildenhues
Subject: Re: Print Libtool project URL in program --help output.
Date: Tue, 15 Jun 2010 20:03:31 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

* Bob Friesenhahn wrote on Sun, Jun 13, 2010 at 06:16:15PM CEST:
> On Sun, 13 Jun 2010, Ralf Wildenhues wrote:
> >Tested with git Autoconf and 2.62.  OK?
> 
> This change looks fine to me.

Thanks for the review.  I had applied this, but it turns out it wasn't
complete after all.  The bootstrap script also tries to extract PACKAGE
and VERSION from configure.ac.  This causes, for example, bogus settings
in tests/package.m4 where the package name was 'GNU' and the email
address@hidden  And then, we were not extracting PACKAGE_NAME and
PACKAGE_URL correctly at all.  And more fallout.

Any reasons against the patch below to fix this?  I'll otherwise push it
soonish.

> >   Print Libtool project URL in program --help output.
> >
> >   * configure.ac (AC_INIT): Set PACKAGE argument to `GNU Libtool',
> >   so Autoconf knows this is GNU software.  For Autoconf < 2.64,
> >   if AC_PACKAGE_URL is not defined, substitute PACKAGE_URL.
[...]

Sorry about that glitch.

Cheers,
Ralf

    Fix bootstrap script to cope with changed AC_INIT arguments.
    
    * bootstrap: When extracting PACKAGE and VERSION from AC_INIT
    arguments, be sure to remove a 'GNU ' prefix and lowercase the
    package name for PACKAGE.  Also set PACKAGE_NAME and PACKAGE_URL
    appropriately for GNU software.  Pass these variables to the
    make commands creating tests/package.m4 and other files.
    * Makefile.am (edit): Fix substitution of PACKAGE_NAME and
    PACKAGE_STRING.
    * libltdl/config/announce-gen.m4sh: Use @PACKAGE@ not
    @address@hidden

diff --git a/Makefile.am b/Makefile.am
index 8e00b3e..aa2cd9c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -127,8 +127,8 @@ edit = sed \
        -e 's,@PACKAGE\@,$(PACKAGE),g' \
        -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
        -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
-       -e 's,@PACKAGE_NAME\@,$(PACKAGE),g' \
-       -e 's,@PACKAGE_STRING\@,$(PACKAGE) $(VERSION),g' \
+       -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
+       -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \
        -e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
        -e 's,@PACKAGE_VERSION\@,$(VERSION),g' \
        -e 's,@SED\@,$(SED),g' \
diff --git a/bootstrap b/bootstrap
index d505c36..81ed4b0 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,8 @@
 #! /bin/sh
 # bootstrap -- Helps bootstrapping libtool, when checked out from repository.
 #
-#   Copyright (C) 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc,
+#   Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Free Software
+#   Foundation, Inc,
 #   Mritten by Gary V. Vaughan, 2003
 #
 #   This file is part of GNU Libtool.
@@ -116,9 +117,18 @@ fi
 set dummy `$SED -n '
     /AC_INIT/{
        s/[][,()]/ /g
+       s/ GNU / /
        p
     }' configure.ac`
 shift
+PACKAGE=`echo "$2" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+PACKAGE_NAME=$2
+PACKAGE_URL=
+if grep 'AC_INIT.*GNU' configure.ac >/dev/null; then
+  PACKAGE_NAME="GNU $PACKAGE_NAME"
+  PACKAGE_URL="http://www.gnu.org/software/$PACKAGE/";
+fi
+VERSION=$3
 
 # Whip up a dirty Makefile:
 makes='Makefile.am libltdl/Makefile.inc'
@@ -135,13 +145,15 @@ rm -f $auxdir/ltmain.sh $m4dir/ltversion.m4
 $MAKE ./$auxdir/ltmain.sh ./$m4dir/ltversion.m4 \
     ./libtoolize.in ./tests/defs.in ./tests/package.m4 \
     ./tests/testsuite ./libltdl/Makefile.am ./doc/notes.txt \
-    srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" \
-    PACKAGE_BUGREPORT="address@hidden" M4SH="$AUTOM4TE --language=m4sh" \
+    srcdir=. top_srcdir=. PACKAGE="$PACKAGE" VERSION="$VERSION" \
+    PACKAGE_NAME="$PACKAGE_NAME" PACKAGE_URL="$PACKAGE_URL" \
+    PACKAGE_BUGREPORT="address@hidden" M4SH="$AUTOM4TE --language=m4sh" \
     AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO" \
     GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"
 
 test -f clcommit.m4sh && $MAKE -f Makefile.maint ./commit \
-    srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="$AUTOM4TE -l m4sh" \
+    srcdir=. top_srcdir=. PACKAGE="$PACKAGE" VERSION="$VERSION" \
+    M4SH="$AUTOM4TE -l m4sh" \
     SED="$SED" GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"
 
 rm -f Makefile
diff --git a/libltdl/config/announce-gen.m4sh b/libltdl/config/announce-gen.m4sh
index a528fef..38e6232 100644
--- a/libltdl/config/announce-gen.m4sh
+++ b/libltdl/config/announce-gen.m4sh
@@ -99,7 +99,7 @@ test -d "$top_srcdir" || top_srcdir='@top_srcdir@'
 
 # Initialisation:
 mailnotify_flags=
-package_name="@PACKAGE_NAME@"
+package_name="@PACKAGE@"
 sendmail_to=
 valid_release_types='alpha,beta,release-candidate,stable'
 



reply via email to

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