From: Alexandre Oliva Date: Wed, 11 Nov 1998 21:12:30 +0000 (+0000) Subject: * ltconfig.in: make use of '~' field separator in reload_cmds, X-Git-Tag: start~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d37f44824fb31f1538269bdd6f72a97467ebc4a;p=thirdparty%2Flibtool.git * ltconfig.in: make use of '~' field separator in reload_cmds, old_archive_from_new_cmds, old_archive_cmds, archive_cmds, old_postinstall_cmds, postinstall_cmds, old_postuninstall_cmds, postuninstall_cmds and finish_cmds, so that the semi-colons inside if/then/else/fi and for/do/done etc. do not break the eval loop in ltmain.in (below). * ltmain.in: changed all of the eval loops to use an IFS of `~', to allow differentiation between the end-of-statement-; (now `~' is used) and end-of-substatement-; (still `;'). This fixes AIX and win32 at least. --- diff --git a/ChangeLog b/ChangeLog index 8fd613783..d65c12722 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +1998-11-11 Gary V, Vaughan + + * ltconfig.in: make use of '~' field separator in reload_cmds, + old_archive_from_new_cmds, old_archive_cmds, archive_cmds, + old_postinstall_cmds, postinstall_cmds, old_postuninstall_cmds, + postuninstall_cmds and finish_cmds, so that the semi-colons inside + if/then/else/fi and for/do/done etc. do not break the eval loop in + ltmain.in (below). + * ltmain.in: changed all of the eval loops to use an IFS of `~', + to allow differentiation between the end-of-statement-; + (now `~' is used) and end-of-substatement-; (still `;'). This + fixes AIX and win32 at least. + 1998-11-11 Alexandre Oliva * ltconfig.in (sunos*, sympat, symxfrm): remove underscore diff --git a/ltconfig.in b/ltconfig.in index dacb74c8a..30ab98043 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -441,8 +441,8 @@ if test "${RANLIB+set}" != "set"; then fi if test -n "$RANLIB"; then - old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" fi # Set sane defaults for `DLLTOOL' and `AS', used on cygwin32. @@ -914,7 +914,7 @@ if test "$with_gnu_ld" = yes; then # See if GNU ld supports shared libraries. case "$host_os" in amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib$libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; @@ -944,16 +944,16 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved) _impure_ptr = __imp_reent_data; } ' > ltdll.c - archive_cmds='$CC -c '"`pwd`"'/ltdll.c; echo EXPORTS > $lib.exp; + archive_cmds='$CC -c '"`pwd`"'/ltdll.c~ echo EXPORTS > $lib.exp~ if test -z "$export_symbols"; then $NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;\ - else cat "$export_symbols" > $lib.exp; fi;\ - $LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;\ - $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp;\ - $LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;\ - $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp;\ - $LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;\ + else cat "$export_symbols" > $lib.exp; fi~\ + $LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\ + $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~\ + $LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\ + $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~\ + $LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\ $rm libtool.$objext $soname-base $soname-exp' - old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib.exp --output-lib $objdir/$libname.a;$rm $lib.exp' + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib.exp --output-lib $objdir/$libname.a~$rm $lib.exp' else # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -965,7 +965,7 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved) # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll;linknames=' + archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. @@ -995,7 +995,7 @@ else aix3*) allow_undefined_flag=unsupported archive_cmds='if test -z "$export_symbols"; then $NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp;\ - else cat "$export_symbols" > $lib.exp; fi;$LD -o $objdir/$soname$libobjs$deplibs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' + else cat "$export_symbols" > $lib.exp; fi~$LD -o $objdir/$soname$libobjs$deplibs -bE:$lib.exp -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes @@ -1009,13 +1009,13 @@ else aix4*) allow_undefined_flag=unsupported archive_cmds='if test -z "$export_symbols"; then $NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp;\ - else cat "$export_symbols" > $lib.exp; fi; $CC -o $objdir/$soname$libobjs$deplibs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' + else cat "$export_symbols" > $lib.exp; fi~ $CC -o $objdir/$soname$libobjs$deplibs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry~$AR cru $lib $objdir/$soname' hardcode_direct=yes hardcode_minus_L=yes ;; amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib$libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; @@ -1038,16 +1038,16 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved) _impure_ptr = __imp_reent_data; } ' > ltdll.c - archive_cmds='$CC -c '"`pwd`"'/ltdll.c; echo EXPORTS > $lib.exp; + archive_cmds='$CC -c '"`pwd`"'/ltdll.c~ echo EXPORTS > $lib.exp~ if test -z "$export_symbols"; then $NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;\ - else cat "$export_symbols" > $lib.exp; fi;\ - $LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;\ - $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp;\ - $LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;\ - $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp;\ - $LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;\ + else cat "$export_symbols" > $lib.exp; fi~\ + $LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\ + $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~\ + $LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\ + $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~\ + $LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\ $rm libtool.$objext $soname-base $soname-exp' - old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib.exp --output-lib $objdir/$libname.a;$rm $lib.exp' + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib.exp --output-lib $objdir/$libname.a~$rm $lib.exp' else # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -1058,7 +1058,7 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved) # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll;linknames=' + archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. @@ -1097,7 +1097,7 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved) ;; hpux9*) - archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs$deplibs;test $objdir/$soname = $lib || mv $objdir/$soname $lib' + archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs$deplibs~test $objdir/$soname = $lib || mv $objdir/$soname $lib' hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_direct=yes hardcode_minus_L=yes @@ -1140,7 +1140,7 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs$deplibs $objdir/$libname.def' + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp$libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib$libobjs$deplibs $objdir/$libname.def' old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; @@ -1619,7 +1619,7 @@ case "$host_os" in aix*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then - archive_cmds="$archive_cmds;\$RANLIB \$lib" + archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; diff --git a/ltmain.in b/ltmain.in index daa3a0e0f..790239537 100644 --- a/ltmain.in +++ b/ltmain.in @@ -1157,7 +1157,7 @@ compiler." else # Parse the version information argument. - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' set dummy $vinfo 0 0 0 IFS="$save_ifs" @@ -1532,7 +1532,7 @@ EOF # Do each of the archive commands. eval cmds=\"$archive_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -1605,7 +1605,7 @@ EOF output="$obj" eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -1629,7 +1629,7 @@ EOF reload_objs="$libobjs" output="$libobj" eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2113,7 +2113,7 @@ fi\ else eval cmds=\"$old_archive_cmds\" fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2395,7 +2395,7 @@ libdir='$install_libdir'\ # Do each command in the postinstall commands. lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2537,7 +2537,7 @@ libdir='$install_libdir'\ # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2576,7 +2576,7 @@ libdir='$install_libdir'\ if test -n "$finish_cmds"; then # Do each command in the finish commands. eval cmds=\"$finish_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2819,7 +2819,7 @@ libdir='$install_libdir'\ if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2831,7 +2831,7 @@ libdir='$install_libdir'\ if test -n "$old_library"; then # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd"