From: Alexandre Oliva Date: Fri, 26 May 2000 05:16:42 +0000 (+0000) Subject: * ltmain.in (compile): When output object is in subdir, create X-Git-Tag: multi-language-merge-point~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95ff76217a6ed034369cb955ba0766525feab828;p=thirdparty%2Flibtool.git * ltmain.in (compile): When output object is in subdir, create the pic_object in subdir/objdir, not objdir/subdir. --- diff --git a/ChangeLog b/ChangeLog index 737b372d7..4499d3bb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-05-26 Alexandre Oliva + + * ltmain.in (compile): When output object is in subdir, create + the pic_object in subdir/objdir, not objdir/subdir. + 2000-05-24 Ossama Othman * libtool.m4 (AC_LIBTOOL_PICMODE): Merged this macro from the HEAD diff --git a/ltmain.in b/ltmain.in index 5a38d9b8a..09caebd74 100644 --- a/ltmain.in +++ b/ltmain.in @@ -502,6 +502,15 @@ if test -z "$show_help"; then ;; esac + objname=`echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 @@ -510,9 +519,9 @@ if test -z "$show_help"; then # Delete any leftover library objects. if test "$build_old_libs" = yes; then - removelist="$obj $objdir/$obj $libobj" + removelist="$obj $lobj $libobj" else - removelist="$objdir/$obj $libobj" + removelist="$lobj $libobj" fi $run $rm $removelist @@ -598,24 +607,24 @@ EOF command="$base_compile $srcfile" fi - if test ! -d $objdir; then - $show "$mkdir $objdir" - $run $mkdir $objdir + if test ! -d ${xdir}$objdir; then + $show "$mkdir ${xdir}$objdir" + $run $mkdir ${xdir}$objdir status=$? - if test $status -ne 0 && test ! -d $objdir; then + if test $status -ne 0 && test ! -d ${xdir}$objdir; then exit $status fi fi # Place PIC objects in $objdir - output_obj="$objdir/$obj" + output_obj=$lobj command="$command -o $output_obj" $run $rm "$output_obj" # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> $libobj <> $libobj <