bug-gnulib
[Top][All Lists]
Advanced

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

small gnulib-tool nits


From: Ralf Wildenhues
Subject: small gnulib-tool nits
Date: Sun, 28 Jan 2007 13:28:09 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Some more bits in gnulib-tool depend upon the locale.  The patch below
fixes some of those.  It also kills one superfluous grep, and avoids a
misparse of the ACLOCAL_AMFLAGS.

OK to apply?

Cheers,
Ralf

2007-01-28  Ralf Wildenhues  <address@hidden>

        * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
        (func_create_testdir): Ensure C locale for `grep' and `tr'
        character ranges.
        (func_create_megatestdir): Avoid one `grep'.  Fix bug in
        ACLOCAL_AMFLAGS parsing state machine.

Index: gnulib-tool
===================================================================
RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v
retrieving revision 1.218
diff -u -r1.218 gnulib-tool
--- gnulib-tool 27 Jan 2007 13:53:54 -0000      1.218
+++ gnulib-tool 28 Jan 2007 12:19:17 -0000
@@ -1287,7 +1287,7 @@
     echo "AM_CPPFLAGS ="
   fi
   echo
-  if grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *= *$libname\\.$libext\$" 
allsnippets.tmp > /dev/null; then
+  if LC_ALL=C grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *= 
*$libname\\.$libext\$" allsnippets.tmp > /dev/null; then
     # One of the snippets already specifies an installation location for the
     # library. Don't confuse automake by saying it should not be installed.
     :
@@ -2147,7 +2157,7 @@
     # _LIBDEPS and _LTLIBDEPS variables are not needed if this library is
     # created using libtool, because libtool already handles the dependencies.
     if test "$libtool" != true; then
-      libname_upper=`echo "$libname" | tr 'a-z' 'A-Z'`
+      libname_upper=`echo "$libname" | LC_ALL=C tr 'a-z' 'A-Z'`
       echo "  ${libname_upper}_LIBDEPS=\"\$gl_libdeps\""
       echo "  AC_SUBST([${libname_upper}_LIBDEPS])"
       echo "  ${libname_upper}_LTLIBDEPS=\"\$gl_ltlibdeps\""
@@ -2508,7 +2518,7 @@
      # _LIBDEPS and _LTLIBDEPS variables are not needed if this library is
      # created using libtool, because libtool already handles the dependencies.
      if test "$libtool" != true; then
-       libname_upper=`echo "$libname" | tr 'a-z' 'A-Z'`
+       libname_upper=`echo "$libname" | LC_ALL=C tr 'a-z' 'A-Z'`
        echo "  ${libname_upper}_LIBDEPS=\"\$gl_libdeps\""
        echo "  AC_SUBST([${libname_upper}_LIBDEPS])"
        echo "  ${libname_upper}_LTLIBDEPS=\"\$gl_ltlibdeps\""
@@ -2621,7 +2631,7 @@
    # _LIBDEPS and _LTLIBDEPS variables are not needed if this library is
    # created using libtool, because libtool already handles the dependencies.
    if test "$libtool" != true; then
-     libname_upper=`echo "$libname" | tr 'a-z' 'A-Z'`
+     libname_upper=`echo "$libname" | LC_ALL=C tr 'a-z' 'A-Z'`
      echo "  ${libname_upper}_LIBDEPS=\"\$gl_libdeps\""
      echo "  AC_SUBST([${libname_upper}_LIBDEPS])"
      echo "  ${libname_upper}_LTLIBDEPS=\"\$gl_ltlibdeps\""
@@ -2859,7 +2869,7 @@
       m4dirs=
       m4dirs_count=0
       if test -f "$destdir"/Makefile.am; then
-        aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[        ]*=' 
"$destdir"/Makefile.am | sed -e 's/^ACLOCAL_AMFLAGS[       ]*=\(.*\)$/\1/'`
+        aclocal_amflags=`sed -n 's/^ACLOCAL_AMFLAGS[    ]*=\(.*\)$/\1/p' 
"$destdir"/Makefile.am`
         m4dir_is_next=
         for arg in $aclocal_amflags; do
           if test -n "$m4dir_is_next"; then
@@ -2873,6 +2883,7 @@
                 fi
                 ;;
             esac
+            m4dir_is_next=
           else
             if test "X$arg" = "X-I"; then
               m4dir_is_next=yes




reply via email to

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