]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* exe/compile-txt.tpl: Handle the case when no tag is explicitly set,
authorRobert Boehne <rboehne@gnu.org>
Thu, 4 Apr 2002 23:32:06 +0000 (23:32 +0000)
committerRobert Boehne <rboehne@gnu.org>
Thu, 4 Apr 2002 23:32:06 +0000 (23:32 +0000)
and $base_compile has a space in front of $CC, and revert the setting
of tagname checked in on 2002-3-14.
* exe/link-txt.tpl: Ditto.
* exe/ltmain.tpl: Ditto.
* ltmain.in: Ditto.

ChangeLog
exe/compile-txt.tpl
exe/link-txt.tpl
exe/ltmain.tpl
ltmain.in

index 2192f08762c2583c519aa70c6875b6382e043670..391554f48a96d443d661669e9fc0ce0ecd630d75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-04-03  Robert Boehne  <rboehne@gnu.org>
+
+       * exe/compile-txt.tpl: Handle the case when no tag is explicitly set,
+       and $base_compile has a space in front of $CC, and revert the setting
+       of tagname checked in on 2002-3-14.
+       * exe/link-txt.tpl: Ditto.
+       * exe/ltmain.tpl: Ditto.
+       * ltmain.in: Ditto.
+
 2002-03-14  Robert Boehne  <rboehne@gnu.org>
 
        ltmain.in: Touch-up to make testsuite pass, and default tagname
index 96d24c6ec401a5dd11e6ac37882c91c3d2057360..e3b59dd94929be105bc7b97231031d8fc123f4c1 100644 (file)
@@ -167,27 +167,22 @@ easier to understand.
     # command doesn't match the default compiler.
     if test -n "$available_tags" && test -z "$tagname"; then
       case "$base_compile " in
-      "$CC "*) ;;
+      "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
       # Blanks in the command may have been stripped by the calling shell,
       # but not from the CC environment variable when ltconfig was run.
-      "`$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
index f74307c9812e8a8abd9d507cc68b59a88acaefa7..e1c34e0b3d3a0029dda75d9ad3b0830caa350772 100644 (file)
     # command doesn't match the default compiler.
     if test -n "$available_tags" && test -z "$tagname"; then
       case $base_compile in
-      "$CC "*) ;;
+      "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
       # Blanks in the command may have been stripped by the calling shell,
       # but not from the CC environment variable when ltconfig was run.
-      "`$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
-             ;;
            esac
          fi
        done
index b46fb6396269773e44eaa7a22621990b968668d5..20c9149aa56854deba47707613821271151a1dd7 100644 (file)
@@ -83,9 +83,6 @@ show="$echo"
 show_help=
 execute_dlfiles=
 
-# set the tag name so that it defaults to CC
-tagname="CC"
-
 # Parse our command line options once, thoroughly.
 while test "$#" -gt 0
 do
index a5134efe2e76cfc27dd1074b0581c7f4e8ff5534..fc441239525165f46b424c10e6bf3a759fda3cfb 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -105,9 +105,6 @@ execute_dlfiles=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
 
-# set the tag name so that it defaults to CC
-tagname="CC"
-
 # Parse our command line options once, thoroughly.
 while test "$#" -gt 0
 do
@@ -470,28 +467,25 @@ if test -z "$show_help"; then
     # Only attempt this if the compiler in the base compile
     # command doesn't match the default compiler.
     if test -n "$available_tags" && test -z "$tagname"; then
-      case "$base_compile " in
-      "$CC "*) ;;
+      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.
-      "`$echo $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.
       *)
        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
@@ -1520,27 +1514,24 @@ EOF
     # command doesn't match the default compiler.
     if test -n "$available_tags" && test -z "$tagname"; then
       case $base_compile in
-      "$CC "*) ;;
       # Blanks in the command may have been stripped by the calling shell,
       # but not from the CC environment variable when ltconfig was run.
-      "`$echo $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.
       *)
        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
-             ;;
            esac
          fi
        done