]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (SP2NL, NL2SP): use `tr' magic to avoid passing very
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Wed, 23 Dec 1998 19:40:56 +0000 (19:40 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 23 Dec 1998 19:40:56 +0000 (19:40 +0000)
long lines to sed
* doc/libtool.texi (sed): very long lines are no longer a problem

ChangeLog
doc/libtool.texi
ltmain.in

index 01ba109710b271d7776ab9c33b77681b21ae2b7b..fb63aa083f69978ef76b0803ffbee9c1c8e80d19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 1998-12-23  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * ltmain.in (SP2NL, NL2SP): use `tr' magic to avoid passing very
+       long lines to sed
+       * doc/libtool.texi (sed): very long lines are no longer a problem
+
        * libltdl/Makefile.am: install libltdl conditionally...
        * libltdl/configure.in: ... if --enable-ltdl-install is issued
        * libltdl/ltdl.c: removed #ifdef DEBUG
index 3b3e714ce51f6acd669b639cab6b674a44733428..8bae2a2b3acf5d5f917403f6cdb9624dcc901b78 100644 (file)
@@ -2866,10 +2866,8 @@ platforms where it claims to support shared libraries:
 
 Note: The vendor-distributed HP-UX @code{sed}(1) programs are horribly
 broken, and cannot handle libtool's requirements, so users may report
-unusual problems. The Solaris @code{sed} program is not suitable either,
-if more than 255 object files are to be linked together. There is no
-workaround except to install a working sed (such as GNU sed) on these
-systems.
+unusual problems.  There is no workaround except to install a working
+@code{sed} (such as GNU @code{sed}) on these systems.
 
 @node Platform quirks
 @section Platform quirks
index bd98e989a7c202023bab93171a1c8138f0ad4800..d0537707edc6dd7d62751eeba91c830027f9872e 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -60,8 +60,10 @@ rm="rm -f"
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
+Xsed='sed -e 1s/^X//'
 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \012 \040'
 
 # NLS nuisances.
 # Only set LANG and LC_ALL to C if already set.
@@ -97,7 +99,6 @@ show="$echo"
 show_help=
 execute_dlfiles=
 lo2o="s/\\.lo\$/.${objext}/"
-los2o="s/\\.lo /.${objext} /g"
 
 # Parse our command line options once, thoroughly.
 while test $# -gt 0
@@ -1377,7 +1378,7 @@ compiler."
        oldlibs="$oldlibs $output_objdir/$libname.$libext"
 
        # Transform .lo files to .o files.
-       oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^   ]*\.'${libext}' //g' -e "$los2o" -e 's/ $//g'`
+       oldobjs="$objs"`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" -e '/^$/d' | $NL2SP`
       fi
 
       if test "$build_libtool_libs" = yes; then
@@ -1563,7 +1564,7 @@ EOF
        done
 
        # Use standard objects if they are PIC.
-       test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e "$los2o" -e 's/ $//g'`
+       test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" -e '/^$/d' | $NL2SP`
 
        if test -n "$whole_archive_flag_spec"; then
          if test -n "$convenience"; then
@@ -1666,7 +1667,7 @@ EOF
       $run $rm $obj $libobj
 
       # Create the old-style object.
-      reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^       ]*\.'${libext}' //g' -e 's/[^       ]*\.lib //g' -e "$los2o" -e 's/ $//g'`
+      reload_objs="$objs"`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" -e '/^$/d' | $NL2SP`
 
       output="$obj"
       eval cmds=\"$reload_cmds\"
@@ -1772,8 +1773,8 @@ EOF
 
       if test -n "$libobjs" && test "$build_old_libs" = yes; then
        # Transform all the library objects into standard objects.
-       compile_command=`$echo "X$compile_command " | $Xsed -e "$los2o" -e 's/ $//'`
-       finalize_command=`$echo "X$finalize_command " | $Xsed -e "$los2o" -e 's/ $//'`
+       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" -e '/^$/d' | $NL2SP`
+       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" -e '/^$/d' | $NL2SP`
       fi
 
       if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
@@ -1788,7 +1789,7 @@ EOF
        *.c)
          if test -z "$export_symbols"; then
            # Add our own program objects to the preloaded list.
-           dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e "$los2o" -e 's/ $//'`
+           dlprefiles=`$echo "X$objs$dlprefiles" | $SP2NL | $Xsed -e "$lo2o" -e '/^$/d' | $NL2SP`
          fi
 
          # Discover the nlist of each of the dlfiles.
@@ -2142,7 +2143,7 @@ fi\
        addlibs="$convenience"
        build_libtool_libs=no
       else
-       oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^   ]*\.'${libext}' //g' -e 's/[^   ]*\.lib //g' -e "$los2o" -e 's/ $//g'`
+       oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" -e '/^$/d' | $NL2SP`
        addlibs="$old_convenience"
       fi