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

ChangeLog
ltmain.in

index 479aac1c891f86e1c7b18e809b85442338c27a71..7d65f6af6f109e5cc3689e1dde70df77ba501838 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 76e680fbfede975f57e85f20de4487fb40fdaf80..4cfeceba99616af5b7da937e1f9bff39f4d92432 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -4770,19 +4770,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