]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): New substituted
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 11 Feb 2007 16:22:42 +0000 (16:22 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 11 Feb 2007 16:22:42 +0000 (16:22 +0000)
function `func_lo2o', saving two fork&exec with XSI shells.
* libltdl/config/ltmain.m4sh (func_mode_compile)
(func_mode_install, func_mode_link): Use it for rewrites of
single files.

ChangeLog
libltdl/config/ltmain.m4sh
libltdl/m4/libtool.m4

index 75435b7c95c82740aacba0ae05a81c8f6c89411b..e10a48fdbf9dd30cb61a9cdb10c1e0f286e698a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-02-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): New substituted
+       function `func_lo2o', saving two fork&exec with XSI shells.
+       * libltdl/config/ltmain.m4sh (func_mode_compile)
+       (func_mode_install, func_mode_link): Use it for rewrites of
+       single files.
+
        * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): New function
        func_opt_split, for XSI and portable shell.
        * libltdl/config/ltmain.m4sh: Move the insertion point for the
index c6643c66e0b5ad3f08388cf50b7c3f26b70309c2..78362827990b37fa5994eec9d0461c02620291bc 100644 (file)
@@ -1331,7 +1331,7 @@ func_mode_compile ()
     libobj=`$ECHO "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
 
     case $libobj in
-    *.lo) obj=`$ECHO "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
     *)
       func_fatal_error "cannot determine name of library object from \`$libobj'"
       ;;
@@ -2028,7 +2028,8 @@ func_mode_install ()
        # Deduce the name of the destination old-style object file.
        case $destfile in
        *.lo)
-         staticdest=`$ECHO "X$destfile" | $Xsed -e "$lo2o"`
+         func_lo2o "$destfile"
+         staticdest=$func_lo2o_result
          ;;
        *.$objext)
          staticdest="$destfile"
@@ -2046,7 +2047,8 @@ func_mode_install ()
        # Install the old object if enabled.
        if test "$build_old_libs" = yes; then
          # Deduce the name of the old-style object file.
-         staticobj=`$ECHO "X$file" | $Xsed -e "$lo2o"`
+         func_lo2o "$file"
+         staticobj=$func_lo2o_result
          func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
        fi
        exit $EXIT_SUCCESS
@@ -2491,8 +2493,9 @@ func_mode_link ()
                  func_dirname "$arg" "/" ""
                  xdir="$func_dirname_result"
 
-                 pic_object=`$ECHO "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-                 non_pic_object=`$ECHO "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+                 func_lo2o "$arg"
+                 pic_object=$xdir$objdir/$func_lo2o_result
+                 non_pic_object=$xdir$func_lo2o_result
                  func_append libobjs " $pic_object"
                  func_append non_pic_objects " $non_pic_object"
                else
@@ -3015,8 +3018,9 @@ func_mode_link ()
            func_dirname "$arg" "/" ""
            xdir="$func_dirname_result"
 
-           pic_object=`$ECHO "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-           non_pic_object=`$ECHO "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+           func_lo2o "$arg"
+           pic_object=$xdir$objdir/$func_lo2o_result
+           non_pic_object=$xdir$func_lo2o_result
            func_append libobjs " $pic_object"
            func_append non_pic_objects " $non_pic_object"
          else
@@ -5462,8 +5466,9 @@ EOF
        test -n "$objs$old_deplibs" && \
          func_fatal_error "cannot build library object \`$output' from non-libtool objects"
 
-       libobj="$output"
-       obj=`$ECHO "X$output" | $Xsed -e "$lo2o"`
+       libobj=$output
+       func_lo2o "$libobj"
+       obj=$func_lo2o_result
        ;;
       *)
        libobj=
index a78f343e2a8d03bf12e54f4df6fca8557778f037..590436c17282574e46ce72e3562dd36a659a52a9 100644 (file)
@@ -7047,6 +7047,15 @@ func_opt_split ()
   func_opt_split_opt=${1%%=*}
   func_opt_split_arg=${1#*=}
 }
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
 _LT_EOF
     ;;
   *) # Bourne compatible functions.
@@ -7097,6 +7106,12 @@ func_opt_split ()
   func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
   func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
 }
+
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
 _LT_EOF
 esac