Fix sed_replace_auxdir.
authorBruno Haible <bruno@clisp.org>
Thu, 12 Jan 2006 15:39:50 +0000 (15:39 +0000)
committerBruno Haible <bruno@clisp.org>
Thu, 12 Jan 2006 15:39:50 +0000 (15:39 +0000)
ChangeLog
gnulib-tool

index 3f93c73..c150f9a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-01-12  Bruno Haible  <bruno@clisp.org>
 
+       * gnulib-tool (func_import, func_create_testdir): Don't go into an
+       endless loop while replacing $auxdir with build-aux.
+
+2006-01-12  Bruno Haible  <bruno@clisp.org>
+
        * modules/ldd: New file.
        * build-aux/ldd.sh.in: New file.
        * MODULES.html.sh (Support for building libraries and executables): Add
index 701de28..3ecc92d 100755 (executable)
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2006-01-11 16:37:10 $'
+cvsdatestamp='$Date: 2006-01-12 15:39:50 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 
@@ -1322,13 +1322,17 @@ func_import ()
     else
       echo "  AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
     fi
-    sed_replace_build_aux='
-      :a
-      /AC_CONFIG_FILES(.*:build-aux\/.*)/{
-        s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:'"$auxdir"'/\2)|
-        ba
-      }'
-    sed_replace_build_aux=`echo "$sed_replace_build_aux" | sed -e 1d -e 's/^ *//'`
+    if test "$auxdir" != "build-aux"; then
+      sed_replace_build_aux='
+        :a
+        /AC_CONFIG_FILES(.*:build-aux\/.*)/{
+          s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:'"$auxdir"'/\2)|
+          ba
+        }'
+      sed_replace_build_aux=`echo "$sed_replace_build_aux" | sed -e 1d -e 's/^ *//'`
+    else
+      sed_replace_build_aux=
+    fi
     for module in $modules; do
       func_verify_module
       if test -n "$module"; then
@@ -1544,13 +1548,17 @@ func_create_testdir ()
      else
        echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
      fi
-     sed_replace_build_aux='
-       :a
-       /AC_CONFIG_FILES(.*:build-aux\/.*)/{
-         s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:../'"$auxdir"'/\2)|
-         ba
-       }'
-     sed_replace_build_aux=`echo "$sed_replace_build_aux" | sed -e 1d -e 's/^ *//'`
+     if test "$auxdir" != "build-aux"; then
+       sed_replace_build_aux='
+         :a
+         /AC_CONFIG_FILES(.*:build-aux\/.*)/{
+           s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:../'"$auxdir"'/\2)|
+           ba
+         }'
+       sed_replace_build_aux=`echo "$sed_replace_build_aux" | sed -e 1d -e 's/^ *//'`
+     else
+       sed_replace_build_aux=
+     fi
      # We don't have explicit ordering constraints between the various
      # autoconf snippets. It's cleanest to put those of the library before
      # those of the tests.
@@ -1621,13 +1629,17 @@ func_create_testdir ()
    else
      echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
    fi
-   sed_replace_build_aux='
-     :a
-     /AC_CONFIG_FILES(.*:build-aux\/.*)/{
-       s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:'"$auxdir"'/\2)|
-       ba
-     }'
-   sed_replace_build_aux=`echo "$sed_replace_build_aux" | sed -e 1d -e 's/^ *//'`
+   if test "$auxdir" != "build-aux"; then
+     sed_replace_build_aux='
+       :a
+       /AC_CONFIG_FILES(.*:build-aux\/.*)/{
+         s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:'"$auxdir"'/\2)|
+         ba
+       }'
+     sed_replace_build_aux=`echo "$sed_replace_build_aux" | sed -e 1d -e 's/^ *//'`
+   else
+     sed_replace_build_aux=
+   fi
    for module in $modules; do
      func_verify_nontests_module
      if test -n "$module"; then