libtool
[Top][All Lists]
Advanced

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

Libtool patch for mode=install on Cygwin


From: Tor Lillqvist
Subject: Libtool patch for mode=install on Cygwin
Date: Mon, 17 Sep 2001 02:00:14 +0300 (EEST)

This fixes a problem on Cygwin (with the Mingw gcc, even if I doubt it
matters here) where invoking libtool --mode=install fails to install
exes. The libtool command line refers to progname.exe, while the
wrapper script that libtool produced is named without the .exe.

(Line number are a bit off, as my ltmain.in also contains some other
changes.)

Index: ltmain.in
===================================================================
RCS file: /cvs/libtool/ltmain.in,v
retrieving revision 1.275
diff -u -2 -r1.275 ltmain.in
--- ltmain.in   2001/09/10 23:33:26     1.275
+++ ltmain.in   2001/09/16 22:51:55
@@ -4771,5 +4772,13 @@
 
        # 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=
@@ -4777,11 +4786,11 @@
          # 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
@@ -4808,6 +4817,6 @@
          # If there is no directory component, then add one.
          case $file in
-         */* | *\\*) . $file ;;
-         *) . ./$file ;;
+         */* | *\\*) . $wrapper ;;
+         *) . ./$wrapper ;;
          esac

Cheers,
Tor Lillqvist




reply via email to

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