mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-12 14:06:37 +08:00
* ltmain.in: don't ignore convenience libraries for objects/archives
(temporary hack)
This commit is contained in:
parent
dc8f52a75b
commit
f8d63238ac
@ -1,3 +1,8 @@
|
||||
1999-09-19 Thomas Tanner <tanner@ffii.org>
|
||||
|
||||
* ltmain.in: don't ignore convenience libraries for objects/archives
|
||||
(temporary hack)
|
||||
|
||||
1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
|
||||
|
||||
* ltconfig.in (CDPATH): Set to `:' instead of empty.
|
||||
|
124
ltmain.in
124
ltmain.in
@ -1230,8 +1230,84 @@ compiler."
|
||||
$echo "$help" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*.a | *.lib)
|
||||
linkmode=oldlib ;;
|
||||
*.lo | *.o | *.obj)
|
||||
linkmode=obj ;;
|
||||
*.la)
|
||||
linkmode=lib ;;
|
||||
*) # Anything else should be a program.
|
||||
linkmode=prog ;;
|
||||
esac
|
||||
|
||||
if test $linkmode = lib || test $linkmode = prog; then
|
||||
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
|
||||
if test "X$output_objdir" = "X$output"; then
|
||||
output_objdir="$objdir"
|
||||
else
|
||||
output_objdir="$output_objdir/$objdir"
|
||||
fi
|
||||
|
||||
# Create the object directory.
|
||||
if test ! -d $output_objdir; then
|
||||
$show "$mkdir $output_objdir"
|
||||
$run $mkdir $output_objdir
|
||||
status=$?
|
||||
if test $status -ne 0 && test ! -d $output_objdir; then
|
||||
exit $status
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Find libtool convenience libraries
|
||||
for deplib in $deplibs; do
|
||||
case "$deplib" in
|
||||
-l* | -L*)
|
||||
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives/objects" 1>&2
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
if test -f "$deplib"; then :
|
||||
else
|
||||
$echo "$modename: cannot find the library \`$deplib'" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
libdir=
|
||||
old_library=
|
||||
|
||||
# Check to see that this really is a libtool archive.
|
||||
if (sed -e '2q' $deplib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||
else
|
||||
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ladir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
|
||||
test "X$ladir" = "X$deplib" && ladir="."
|
||||
|
||||
# Read the .la file
|
||||
case "$deplib" in
|
||||
*/* | *\\*) . $deplib ;;
|
||||
*) . ./$deplib ;;
|
||||
esac
|
||||
|
||||
if test -z "$old_library"; then
|
||||
$echo "$modename: cannot find name of link library for \`$deplib'" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -n "$libdir"; then
|
||||
$echo "$modename: \`$deplib' is not a convenience library" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# It is a libtool convenience library, so add in its objects.
|
||||
convenience="$convenience $ladir/$objdir/$old_library"
|
||||
old_convenience="$old_convenience $ladir/$objdir/$old_library"
|
||||
done
|
||||
fi
|
||||
|
||||
case $linkmode in
|
||||
oldlib)
|
||||
if test -n "$deplibs"; then
|
||||
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
|
||||
fi
|
||||
@ -1266,7 +1342,7 @@ compiler."
|
||||
objs="$objs$old_deplibs"
|
||||
;;
|
||||
|
||||
*.la)
|
||||
lib)
|
||||
# Make sure we only generate libraries of the form `libNAME.la'.
|
||||
case "$outputname" in
|
||||
lib*)
|
||||
@ -1289,13 +1365,6 @@ compiler."
|
||||
;;
|
||||
esac
|
||||
|
||||
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
|
||||
if test "X$output_objdir" = "X$output"; then
|
||||
output_objdir="$objdir"
|
||||
else
|
||||
output_objdir="$output_objdir/$objdir"
|
||||
fi
|
||||
|
||||
if test -n "$objs$old_deplibs"; then
|
||||
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
|
||||
exit 1
|
||||
@ -1483,18 +1552,9 @@ compiler."
|
||||
fi
|
||||
|
||||
if test "$relink" = no; then
|
||||
# Create the output directory, or remove our outputs if we need to.
|
||||
if test -d $output_objdir; then
|
||||
$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
|
||||
$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
|
||||
else
|
||||
$show "$mkdir $output_objdir"
|
||||
$run $mkdir $output_objdir
|
||||
status=$?
|
||||
if test $status -ne 0 && test ! -d $output_objdir; then
|
||||
exit $status
|
||||
fi
|
||||
fi
|
||||
# Remove our outputs.
|
||||
$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
|
||||
$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
|
||||
fi
|
||||
|
||||
# Now set the variables for building old libraries.
|
||||
@ -2343,7 +2403,7 @@ EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
*.lo | *.o | *.obj)
|
||||
obj)
|
||||
if test -n "$deplibs"; then
|
||||
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
|
||||
fi
|
||||
@ -2508,8 +2568,7 @@ EOF
|
||||
exit 0
|
||||
;;
|
||||
|
||||
# Anything else should be a program.
|
||||
*)
|
||||
prog)
|
||||
if test -n "$vinfo"; then
|
||||
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
|
||||
fi
|
||||
@ -2525,23 +2584,6 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
|
||||
if test "X$output_objdir" = "X$output"; then
|
||||
output_objdir="$objdir"
|
||||
else
|
||||
output_objdir="$output_objdir/$objdir"
|
||||
fi
|
||||
|
||||
# Create the binary in the object directory, then wrap it.
|
||||
if test ! -d $output_objdir; then
|
||||
$show "$mkdir $output_objdir"
|
||||
$run $mkdir $output_objdir
|
||||
status=$?
|
||||
if test $status -ne 0 && test ! -d $output_objdir; then
|
||||
exit $status
|
||||
fi
|
||||
fi
|
||||
|
||||
# Find libtool libraries and add their dependencies
|
||||
save_deplibs="$deplibs"
|
||||
deplibs=
|
||||
|
Loading…
Reference in New Issue
Block a user