bug-libtool
[Top][All Lists]
Advanced

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

Wrapper script fails if target compiled from a different dir


From: Wesley W. Terpstra
Subject: Wrapper script fails if target compiled from a different dir
Date: Wed, 18 Oct 2000 19:03:12 -0600
User-agent: Mutt/1.2.5i

Under a typical Debian-potato linux system (and any other I'll wager), run:

libtool c++ -o foo/bar foo/main.o foo/libfoo.la

Try running the produced wrapper.  The relink_command will fail b/c the
wrapper changes into the directory foo and then executes it. It will then be
unable to find the file foo/main.o foo/libfoo.la.

This is very detrimental to the non-recursive makefiles of which I am quite
fond.

A quick hack to ltmain.in (around line 2884 [not a read diff]):

    # relink executable if necessary
    if test -n \"\$relink_command\"; then
-      if (cd \"\$thisdir\" && eval \$relink_command); then :
+      if (cd \"`pwd`" && eval \$relink_command); then :
      else  
        $rm \"\$progdir/\$file\"
        exit 1
      fi
    fi  

This way you embed the location from which the compile took place directly
into the wrapper script.

-- 
Wesley W. Terpstra <address@hidden>
Javien Canada Inc. - Linux Developer



reply via email to

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