libtool-patches
[Top][All Lists]
Advanced

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

Re: test && test --> test -a


From: Robert Boehne
Subject: Re: test && test --> test -a
Date: Tue, 04 Dec 2001 10:49:17 -0600

Jens:

Ok, I looked for the wrong string in ltmain.in (my bad!).
My personal standards for portability are, "if it's used in ltmain.in,
then it's OK" or "an authorative figure has assured me this is
more portable" or "this isn't portable - here's the error I get on...".
So, since test -a is currently used in ltmain.in, then it's ok until
somone tells me otherwise.

I don't understand why you want to change this, either way, -a or &&
both are portable, both work exactly the same way (AFAICT).
If you have some specific reason to go one way or the other, let us
know, otherwise what's the point?

Robert

Jens Petersen wrote:
> 
> Take two.... ;)
> 
> 2001-12-04  Jens Petersen  <address@hidden>
> 
>         * ltmain.in: Replace all test "-a"s by  "&& test"
>         for portability.
> 
> Index: ltmain.in
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/ltmain.in,v
> retrieving revision 1.284
> diff -u -r1.284 ltmain.in
> --- ltmain.in   2001/11/27 23:10:22     1.284
> +++ ltmain.in   2001/12/04 04:53:29
> @@ -2898,7 +2898,7 @@
>             for i in $deplibs; do
>               name="`expr $i : '-l\(.*\)'`"
>               # If $name is empty we are operating on a -L argument.
> -             if test "$name" != "" -a "$name" -ne "0"; then
> +             if test "$name" != "" && test "$name" -ne "0"; then
>                 libname=`eval \\$echo \"$libname_spec\"`
>                 deplib_matches=`eval \\$echo \"$library_names_spec\"`
>                 set dummy $deplib_matches
> @@ -2925,7 +2925,7 @@
>             for i in $deplibs; do
>               name="`expr $i : '-l\(.*\)'`"
>              # If $name is empty we are operating on a -L argument.
> -             if test "$name" != "" -a "$name" != "0"; then
> +             if test "$name" != "" && test "$name" != "0"; then
>                 $rm conftest
>                 $LTCC -o conftest conftest.c $i
>                 # Did it work?
> @@ -2967,7 +2967,7 @@
>           for a_deplib in $deplibs; do
>             name="`expr $a_deplib : '-l\(.*\)'`"
>             # If $name is empty we are operating on a -L argument.
> -           if test "$name" != "" -a "$name" != "0"; then
> +           if test "$name" != "" && test  "$name" != "0"; then
>               libname=`eval \\$echo \"$libname_spec\"`
>               for i in $lib_search_path $sys_lib_search_path 
> $shlib_search_path; do
>                     potential_libs=`ls $i/$libname[.-]* 2>/dev/null`

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

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