changeset 7239:e6f5fe9992ff

Fix problem when calling "gnulib-tool --update" on multiple directories.
author Bruno Haible <bruno@clisp.org>
date Thu, 31 Aug 2006 13:11:23 +0000
parents e3f65c753bef
children e9d3ace50303
files ChangeLog gnulib-tool
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-31  Bruno Haible  <bruno@clisp.org>
+
+	* gnulib-tool: When calling func_import more than once, do it in a
+	subshell.
+	Reported by Eric Blake <ebb9@byu.net>.
+
 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
 
 	* modules/nanosleep (Depends-on): Add gettime.
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2006-08-30 18:13:34 $'
+cvsdatestamp='$Date: 2006-08-31 13:11:23 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 
@@ -2417,7 +2417,12 @@
           if test $# = 0; then
             # No further arguments. Guess the user wants to update all of them.
             for m4base in $m4dirs; do
-              func_import
+              # Perform func_import in a subshell, so that variable values
+              # such as
+              #   local_gnulib_dir, avoidlist, sourcebase, m4base, docbase,
+              #   testsbase, libname, lgpl, makefile_name, libtool, macro_prefix
+              # don't propagate from one directory to another.
+              (func_import) || exit 1
             done
           else
             # Really ambiguous.