m4-patches
[Top][All Lists]
Advanced

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

Re: update use of gnulib-tool


From: Eric Blake
Subject: Re: update use of gnulib-tool
Date: Fri, 05 May 2006 07:31:15 -0600
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

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

According to Bruno Haible on 5/2/2006 8:40 AM:
> Hi,
> 
> The way of invoking gnulib-tool has changed in the last few months:
> Parameters are now cached in a separate file gnulib-cache.m4 that is
> meant to be stored in CVS, and no longer provided in configure.ac.

Thanks for the patch, it subsumes what I attempted several months ago:
http://lists.gnu.org/archive/html/m4-patches/2005-09/msg00000.html

I saw your assignment for several FSF projects, but not for m4; care to
fill out the paperwork (again :)?  Meanwhile, this is small enough
(although the total patch is larger, it is mechanical based on the few
lines in your email), and close enough to my earlier proposal, that I am
going ahead to check it in.  You also forgot a change log entry.

> 
> The steps to update to a new gnulib-tool are:
> 
> 1) Run once the command
> 
> $ gnulib-tool --import --source-base=gnu --m4-base=ltdl/m4 \
>                        assert error exit free gettext mkstemp obstack \
>                        progname regex stdbool strtol xalloc xalloc-die \
>                        xstrndup
> 
> 2) Remove the configuration from configure.ac:
> 
> *** configure.ac.bak    2005-08-25 22:15:34.000000000 +0200
> --- configure.ac        2006-04-30 00:37:28.000000000 +0200
> ***************
> *** 143,153 ****
>   ## --------------- ##
>   ## Gnulib support, ##
>   ## --------------- ##
> - gl_SOURCE_BASE(gnu)
> - gl_M4_BASE(ltdl/m4)
> - # We also use getopt and version-etc, but they are copied into
> - # the project tree by bootstrap since they are used only by m4 itself.
> - gl_MODULES(assert error exit free gettext mkstemp obstack progname regex 
> stdbool strtol xalloc xalloc-die xstrndup)
>   gl_INIT
>   
>   # Gnulib doesn't always do things quite the way M4 would like...
> --- 144,149 ----
> 
> 3) Commit ltdl/m4/gnulib-cache.m4 into the CVS.

Hmm.  gnulib-tool created it with a copyright date of 2004.  We should
update gnulib-tool to have a single location for copyright dates (it
currently has 6 separate copyright notices, encompassing 4 different date
ranges).

> 
> 4) Change bootstrap to use "gnulib-tool --update":
> 
> *** bootstrap.bak       2006-04-29 18:20:51.000000000 +0200
> --- bootstrap   2006-04-30 01:08:58.000000000 +0200
> ***************
> *** 117,124 ****
>   ## Import Gnulib modules. ##
>   ## ---------------------- ##
>   
> ! func_echo "running: ${GNULIB_TOOL} --import"
> ! ${GNULIB_TOOL} --import
>   
>   func_echo "patching include directories in gnulib regex module"
>   mv $config_macro_dir/regex.m4 $config_macro_dir/regex-m4.old
> --- 117,124 ----
>   ## Import Gnulib modules. ##
>   ## ---------------------- ##
>   
> ! func_echo "running: ${GNULIB_TOOL} --update"
> ! ${GNULIB_TOOL} --update
>   
>   func_echo "patching include directories in gnulib regex module"
>   mv $config_macro_dir/regex.m4 $config_macro_dir/regex-m4.old
> 
> 
> Bruno
> 

Actual patch committed:

THANKS:
added Eric Blake, Bruno Haible (patch omitted, since it contains email
addresses)

ChangeLog:
2006-05-05  Eric Blake  <address@hidden>

        * THANKS: Update.

2006-05-05  Bruno Haible  <bruno AT clisp.org>
            Eric Blake  <address@hidden>

        * configure.ac (gl_SOURCE_BASE, gl_M4_BASE, gl_MODULES): Move to...
        * ltdl/m4/gnulib-cache.m4: ...this new file, per new gnulib-tool
        usage pattern.
        * bootstrap: Update usage of gnulib-tool.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEW1Oi84KuGfSFAYARAmFzAJsFc4gsdVoO94FUTQIg/7A/UhnjfwCfS4Mf
GNUObqaD0EjTUQKAsWvVvB0=
=UlFC
-----END PGP SIGNATURE-----
Index: bootstrap
===================================================================
RCS file: /sources/m4/m4/bootstrap,v
retrieving revision 1.30
diff -u -p -r1.30 bootstrap
--- bootstrap   5 Dec 2005 15:08:39 -0000       1.30
+++ bootstrap   5 May 2006 13:12:26 -0000
@@ -89,7 +89,7 @@ esac
 ## ---------------------------- ##
 
 case $GNULIB_TOOL in
-    /*  )  gnulibdir=$GNULIB_TOOL ;;           # absolute
+    /*  )  gnulibdir=$GNULIB_TOOL ;;           # absolute
     */* )  gnulibdir=`pwd`/$GNULIB_TOOL ;;     # relative
     *   )  gnulibdir=`which "$GNULIB_TOOL"` ;; # PATH search
 esac
@@ -117,8 +117,8 @@ gnulibdir=`echo "$gnulibdir" | $SED "$di
 ## Import Gnulib modules. ##
 ## ---------------------- ##
 
-func_echo "running: ${GNULIB_TOOL} --import"
-${GNULIB_TOOL} --import
+func_echo "running: ${GNULIB_TOOL} --update"
+${GNULIB_TOOL} --update
 
 func_echo "patching include directories in gnulib regex module"
 mv $config_macro_dir/regex.m4 $config_macro_dir/regex-m4.old
Index: configure.ac
===================================================================
RCS file: /sources/m4/m4/configure.ac,v
retrieving revision 1.42
diff -u -p -r1.42 configure.ac
--- configure.ac        7 May 2005 19:46:13 -0000       1.42
+++ configure.ac        5 May 2006 13:12:26 -0000
@@ -1,5 +1,5 @@
 # Configure template for GNU m4.                       -*-Autoconf-*-
-# Copyright (C) 1991, 1992, 1993, 1994, 2000, 2001, 2002, 2004, 2005
+# Copyright (C) 1991, 1992, 1993, 1994, 2000, 2001, 2002, 2004, 2005, 2006
 # Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -143,11 +143,6 @@ m4_GNU_GETTEXT
 ## --------------- ##
 ## Gnulib support, ##
 ## --------------- ##
-gl_SOURCE_BASE(gnu)
-gl_M4_BASE(ltdl/m4)
-# We also use getopt and version-etc, but they are copied into
-# the project tree by bootstrap since they are used only by m4 itself.
-gl_MODULES(assert error exit free gettext mkstemp obstack progname regex 
stdbool strtol xalloc xalloc-die xstrndup)
 gl_INIT
 
 # Gnulib doesn't always do things quite the way M4 would like...
Index: ltdl/m4/gnulib-cache.m4
===================================================================
RCS file: ltdl/m4/gnulib-cache.m4
diff -N ltdl/m4/gnulib-cache.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ltdl/m4/gnulib-cache.m4     5 May 2006 13:12:26 -0000
@@ -0,0 +1,27 @@
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the specification of how gnulib-tool is used.
+# It acts as a cache: It is written and read by gnulib-tool.
+# In projects using CVS, this file is meant to be stored in CVS,
+# like the configure.ac and various Makefile.am files.
+
+
+# Specification in the form of a command-line invocation:
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=gnu 
--m4-base=ltdl/m4 --aux-dir=ltdl/config --libtool --macro-prefix=gl assert 
error exit free gettext mkstemp obstack progname regex stdbool strtol xalloc 
xalloc-die xstrndup
+
+# Specification in the form of a few gnulib-tool.m4 macro invocations:
+gl_MODULES([assert error exit free gettext mkstemp obstack progname regex 
stdbool strtol xalloc xalloc-die xstrndup])
+gl_AVOID([])
+gl_SOURCE_BASE([gnu])
+gl_M4_BASE([ltdl/m4])
+gl_TESTS_BASE([tests])
+gl_LIB([libgnu])
+gl_LIBTOOL
+gl_MACRO_PREFIX([gl])

reply via email to

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