libtool
[Top][All Lists]
Advanced

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

Re: PATCH: pointless code removal


From: Albert Chin
Subject: Re: PATCH: pointless code removal
Date: Tue, 2 Apr 2002 17:35:36 -0600
User-agent: Mutt/1.2.5i

On Tue, Apr 02, 2002 at 10:41:15AM -0600, Robert Boehne wrote:
> There was a bit missing in my patch yesterday, which the tagdemo
> tests caught right away.  The same logic to check for spaces needs
> to be in the tag matching code all the way through.  With this patch
> I'm getting all tests passed under Tru64 and Linux, and no more
> than two failures (namely quote.test) on Sun 5.[678], Irix, and AIX
> 4.3.
> 
> 2002-04-02  Robert Boehne  <address@hidden>
> 
>       * ltmain.in: Finish the tag matching logic started yesterday and
>       refactor it a bit.

Isn't the use of `$echo $CC` gross? If $base_compile/$CC has to "look"
a certain way, why not set it the way we want so every time we need to
inspect these variables we don't duplicate code.

> Index: ltmain.in
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/ltmain.in,v
> retrieving revision 1.291
> diff -u -r1.291 ltmain.in
> --- ltmain.in 1 Apr 2002 22:49:08 -0000       1.291
> +++ ltmain.in 2 Apr 2002 16:33:07 -0000
> @@ -470,29 +470,22 @@
>        case $base_compile in
>        # Blanks in the command may have been stripped by the calling shell,
>        # but not from the CC environment variable when ltconfig was run.
> -      "$CC "*) ;;
> +      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
>        # Blanks at the start of $base_compile will cause this to fail
>        # if we don't check for them as well.
> -      " $CC "*) ;;
> -      "`$echo $CC` "*) ;;
> -      " `$echo $CC` "*) ;;
>        *)
>       for z in $available_tags; do
>         if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; 
> then
>           # Evaluate the configuration.
>           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# 
> ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
>           case "$base_compile " in
> -         "$CC "*)
> +         "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
>             # The compiler in the base compile command matches
>             # the one in the tagged configuration.
>             # Assume this is the tagged configuration we want.
>             tagname=$z
>             break
>             ;;
> -         "`$echo $CC` "*)
> -           tagname=$z
> -           break
> -           ;;
>           esac
>         fi
>       done
> @@ -1523,26 +1516,19 @@
>        case $base_compile in
>        # Blanks in the command may have been stripped by the calling shell,
>        # but not from the CC environment variable when ltconfig was run.
> -      "$CC "*) ;;
> +      "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
>        # Blanks at the start of $base_compile will cause this to fail
>        # if we don't check for them as well.
> -      " $CC "*) ;;
> -      "`$echo $CC` "*) ;;
> -      " `$echo $CC` "*) ;;
>        *)
>       for z in $available_tags; do
>         if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; 
> then
>           # Evaluate the configuration.
>           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# 
> ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
>           case $base_compile in
> -         "$CC "*)
> +         "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
>             # The compiler in $compile_command matches
>             # the one in the tagged configuration.
>             # Assume this is the tagged configuration we want.
> -           tagname=$z
> -           break
> -           ;;
> -         "`$echo $CC` "*)
>             tagname=$z
>             break
>             ;;


-- 
albert chin (address@hidden)



reply via email to

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