libtool-patches
[Top][All Lists]
Advanced

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

Re: FYI: sh.test needs the correct path to ltmain.sh [libtool--release--


From: Ralf Wildenhues
Subject: Re: FYI: sh.test needs the correct path to ltmain.sh [libtool--release--2.0--patch-11]
Date: Thu, 7 Oct 2004 11:56:39 +0200
User-agent: Mutt/1.4.1i

* Gary V. Vaughan wrote on Thu, Oct 07, 2004 at 04:47:39AM CEST:
>   Index: Changelog
>   from  Gary V. Vaughan  <address@hidden>
>       * tests/defs.m4sh (scripts): Actually scan the generated ltmain.sh
>       for shell portability problems.
>   
>   --- orig/tests/defs.m4sh
>   +++ mod/tests/defs.m4sh
>   @@ -299,7 +299,7 @@
>    # Shared global variables for test scripts
>    prefix="./_inst"
>    srcdir=`cd $srcdir && pwd`
>   -scripts="$srcdir/config/ltmain.sh ../libtoolize"
>   +scripts="$srcdir/../config/ltmain.sh ../libtoolize"
>    
>    func_msg "Running $progname"
>    
>   

This, however (yes, really) breaks things.  Of course this patch is not
at fault, rather it exposes a couple of things:

| sh.test: ===  Running sh.test
| /tmp/libtool-2.0/libtool/tests/../config/ltmain.sh:141:if test "x$as_myself" 
= x; then
| ../libtoolize:126:if test "x$as_myself" = x; then
| use `test "X..."' instead of `test "x..."'
| /tmp/libtool-2.0/libtool/tests/../config/ltmain.sh:134:  test -r "$as_dir/$0" 
&& as_myself=$as_dir/$0 && break
| ../libtoolize:119:  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
| assignments on the same line as a `break' or `continue' may have no effect
| FAIL: sh.test

Both failures come from autoconf/lib/m4sugar/m4sh.m4 (expansion of
AS_SHELL_SANITIZE) and fail for CVS Autoconf, but should fail for
2.59 as well.  While it may or may not be desirable to change things
there, it's undesirable to force users to upgrade Autoconf once more
before Libtool-2.0 (let alone thinking out loud about a new Autoconf
release).

So sh.test ought to be relaxed:  My suggestion'd be to just disable
the first test now, and use the following workaround for the second:
Allow the line if it contains a `&'.  Just a simple-minded idea.

OK to apply to branch-2-0 and HEAD?

Regards,
Ralf

cvs diff: Diffing tests
Index: tests/sh.test
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/sh.test,v
retrieving revision 1.19
diff -u -r1.19 sh.test
--- tests/sh.test       23 Sep 2004 14:50:36 -0000      1.19
+++ tests/sh.test       7 Oct 2004 09:53:02 -0000
@@ -44,10 +44,11 @@
   status=$EXIT_FAILURE
 fi
 
-if $EGREP -n -e 'test[         ]+(![   ])?(-.[         ]+)?"?[.,_x]' $scripts; 
then
-  echo "use \`test \"X...\"' instead of \`test \"x...\"'"
-  status=$EXIT_FAILURE
-fi
+# disabled for now.
+#if $EGREP -n -e 'test[        ]+(![   ])?(-.[         ]+)?"?[.,_x]' $scripts; 
then
+#  echo "use \`test \"X...\"' instead of \`test \"x...\"'"
+#  status=$EXIT_FAILURE
+#fi
 
 # Check for using test X... instead of test "X...
 if $EGREP -n -e 'test[         ]+(![   ])?(-.[         ]+)?X' $scripts; then
@@ -68,7 +69,7 @@
 fi
 
 # Check for problems with variable assignments.
-if $EGREP -n -e '[^     ]=[^    ].*(break|continue)' $scripts; then
+if $EGREP -n -e '[^     ]=[^    ][^&]*(break|continue)' $scripts; then
   echo "assignments on the same line as a \`break' or \`continue' may have no 
effect"
   status=$EXIT_FAILURE
 fi




reply via email to

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