mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-27 06:09:57 +08:00
* ltmain.in: Fix creation of relative links to object files in
sub-dirs.
This commit is contained in:
parent
136171cb82
commit
b0dad73a36
@ -1,3 +1,8 @@
|
||||
1999-07-29 Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||
|
||||
* ltmain.in: Fix creation of relative links to object files in
|
||||
sub-dirs.
|
||||
|
||||
1999-07-29 Olly Betts <olly@muscat.co.uk>
|
||||
|
||||
* ltconfig.in(cygwin mingw32, archive_expsym_cmds): Only compile
|
||||
|
56
ltmain.in
56
ltmain.in
@ -527,9 +527,17 @@ compiler."
|
||||
exit $error
|
||||
fi
|
||||
|
||||
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
|
||||
if test "X$xdir" = "X$obj"; then
|
||||
xdir="."
|
||||
else
|
||||
xdir="$xdir"
|
||||
fi
|
||||
baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
|
||||
libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
|
||||
# Now arrange that obj and lo_libobj become the same file
|
||||
$show "$LN_S $obj $lo_libobj"
|
||||
if $run $LN_S $obj $lo_libobj; then
|
||||
$show "(cd $xdir && $LN_S $baseobj $libobj)"
|
||||
if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
|
||||
exit 0
|
||||
else
|
||||
error=$?
|
||||
@ -2378,10 +2386,17 @@ EOF
|
||||
# Ensure that we have .o objects for linkers which dislike .lo
|
||||
# (e.g. aix) incase we are running --disable-static
|
||||
for obj in $libobjs; do
|
||||
oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
|
||||
if test ! -f $oldobj; then
|
||||
$show "${LN_S} $obj $oldobj"
|
||||
$run ${LN_S} $obj $oldobj || exit $?
|
||||
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
|
||||
if test "X$xdir" = "X$obj"; then
|
||||
xdir="."
|
||||
else
|
||||
xdir="$xdir"
|
||||
fi
|
||||
baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
|
||||
oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
|
||||
if test ! -f $xdir/$oldobj; then
|
||||
$show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
|
||||
$run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
|
||||
fi
|
||||
done
|
||||
|
||||
@ -2646,8 +2661,16 @@ EOF
|
||||
# Just create a symlink.
|
||||
$show $rm $libobj
|
||||
$run $rm $libobj
|
||||
$show "$LN_S $obj $libobj"
|
||||
$run $LN_S $obj $libobj || exit $?
|
||||
xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
|
||||
if test "X$xdir" = "X$libobj"; then
|
||||
xdir="."
|
||||
else
|
||||
xdir="$xdir"
|
||||
fi
|
||||
baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
|
||||
oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
|
||||
$show "(cd $xdir && $LN_S $oldobj $baseobj)"
|
||||
$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
|
||||
fi
|
||||
|
||||
if test -n "$gentop"; then
|
||||
@ -3782,14 +3805,21 @@ fi\
|
||||
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
|
||||
eval cmds=\"$old_archive_from_new_cmds\"
|
||||
else
|
||||
# Ensure that we have .o objects in place incase we decided
|
||||
# Ensure that we have .o objects in place in case we decided
|
||||
# not to build a shared library, and have fallen back to building
|
||||
# static libs even though --disable-static was passed!
|
||||
for oldobj in $oldobjs; do
|
||||
if test ! -f $oldobj; then
|
||||
obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"`
|
||||
$show "${LN_S} $obj $oldobj"
|
||||
$run ${LN_S} $obj $oldobj || exit $?
|
||||
xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
|
||||
if test "X$xdir" = "X$oldobj"; then
|
||||
xdir="."
|
||||
else
|
||||
xdir="$xdir"
|
||||
fi
|
||||
baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
|
||||
obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
|
||||
$show "(cd $xdir && ${LN_S} $obj $baseobj)"
|
||||
$run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
|
||||
fi
|
||||
done
|
||||
|
||||
@ -3886,7 +3916,7 @@ relink_command=\"$relink_command\""
|
||||
# Do a symbolic link so that the libtool archive can be found in
|
||||
# LD_LIBRARY_PATH before the program is installed.
|
||||
$show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
|
||||
$run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
|
||||
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user