]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
From Tor Lillqvist <tml@iki.fi>:
authorGary V. Vaughan <gary@gnu.org>
Fri, 21 Sep 2001 20:16:31 +0000 (20:16 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 21 Sep 2001 20:16:31 +0000 (20:16 +0000)
* ltmain.in [cygwin* mingw*]: Take care of the difference between
wrapper script name and executable name.

ChangeLog
ltmain.in

index 41ce07ae3fea6d7dd899f7b5676e1b45344dbf81..4d482c0e532d75e17902c573efdd9b438d7d659b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2001-09-21  Gary V. Vaughan  <gary@gnu.org>
 
+       From Tor Lillqvist <tml@iki.fi>:
+       * ltmain.in [cygwin* mingw*]: Take care of the difference between
+       wrapper script name and executable name.
+
        * libtool.m4 (archive_cmds) [darwin1.[0-2]]: Darwin uses zsh-3.1.6
        for /bin/sh, and that shell does not handle escaped quotes
        properly yet.
index 76acd11b644f90ca8bb60f66fe5a9ddd5f41407e..1d004ad98d48b97dd574aef89502031410d0e1d3 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -4273,19 +4273,27 @@ relink_command=\"$relink_command\""
        fi
 
        # Do a test to see if this is really a libtool program.
-       if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+       case $host in
+       *cygwin*|*mingw*)
+           wrapper=`echo $file | sed -e 's,.exe$,,'`
+           ;;
+       *)
+           wrapper=$file
+           ;;
+       esac
+       if (sed -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
          notinst_deplibs=
          relink_command=
 
          # If there is no directory component, then add one.
          case $file in
-         */* | *\\*) . $file ;;
-         *) . ./$file ;;
+         */* | *\\*) . $wrapper ;;
+         *) . ./$wrapper ;;
          esac
 
          # Check the variables that should have been set.
          if test -z "$notinst_deplibs"; then
-           $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+           $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
            exit 1
          fi
 
@@ -4310,8 +4318,8 @@ relink_command=\"$relink_command\""
          relink_command=
          # If there is no directory component, then add one.
          case $file in
-         */* | *\\*) . $file ;;
-         *) . ./$file ;;
+         */* | *\\*) . $wrapper ;;
+         *) . ./$wrapper ;;
          esac
 
          outputname=