]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Allow special characters in source file names. Will break unless
authorPer Bothner <per@bothner.com>
Sat, 12 Mar 2005 08:50:45 +0000 (08:50 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 12 Mar 2005 08:50:45 +0000 (08:50 +0000)
`-o target' is also given, which must not contain special characters.
En passant, fix source file quoting broken for cygwin/MSVC.

ChangeLog
NEWS
config/ltmain.m4sh

index 1d2fdb47eecb5664b71c4a9cca8e60487ff1d8ba..2db617477f4e60ddf63e38bb13ee9cc653e1ed37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-03-06  Per Bothner <per@bothner.com>,
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Allow special characters in source file names.  Will break unless
+       `-o target' is also given, which must not contain special characters.
+       En passant, fix source file quoting broken for cygwin/MSVC.
+
+       * ltmain.m4sh (func_mode_compile): Use new variable qsrcfile
+       for quoted source file name for compile $command.  Fix missing
+       quotes for _c_o lockfile.
+       * NEWS: Update.
+
 2005-03-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * config/ltmain.m4sh (func_mode_link): Reword double negation in
diff --git a/NEWS b/NEWS
index 663533fc248ec92645a28392a0ecd6817003f2ae..3e3570f5ecbcfec96260d923d3fdb9eb14ba6244 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ New in 1.9h: 2004-??-??; CVS version 1.9g, Libtool team:
 * Support for linux-dietlibc (`diet' as well as `diet-dyn', separately).
 * `libtoolize --install' now also installs `install-sh'.
 * Support (mostly) for DragonFly BSD.
+* Allow shell special characters like `$' in source file names, but not
+  in object names, to enhance GCJ support.
 \f
 New in 1.9f: 2004-10-23; CVS version 1.9e, Libtool team:
 * Calculate dllsearchpath correctly for wrapper scripts on cygwin.
index 3c8ad17f1a5e1eb89729e21c4782d3e1a9d461ad..20bdfbab73a47f8ddaa9bd2e3cf55c77042f481e 100644 (file)
@@ -1195,6 +1195,9 @@ func_mode_compile ()
       esac
     done
 
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && func_fatal_error "libobj name \`$libobj' may not contain shell special characters."
     objname=`$ECHO "X$obj" | $Xsed -e 's%^.*/%%'`
     xdir=`$ECHO "X$obj" | $Xsed -e 's%/[[^/]]*$%%'`
     if test "X$xdir" = "X$obj"; then
@@ -1264,12 +1267,14 @@ compiler."
        $run $RM $removelist
        exit $EXIT_FAILURE
       fi
-      $ECHO $srcfile > "$lockfile"
+      $ECHO "$srcfile" > "$lockfile"
     fi
 
     if test -n "$fix_srcfile_path"; then
       eval srcfile=\"$fix_srcfile_path\"
     fi
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
 
     $run $RM "$libobj" "${libobj}T"
 
@@ -1291,10 +1296,10 @@ EOF
       fbsd_hideous_sh_bug=$base_compile
 
       if test "$pic_mode" != no; then
-       command="$base_compile $srcfile $pic_flag"
+       command="$base_compile $qsrcfile $pic_flag"
       else
        # Don't build PIC code
-       command="$base_compile $srcfile"
+       command="$base_compile $qsrcfile"
       fi
 
       func_mkdir_p "$xdir$objdir"
@@ -1367,9 +1372,9 @@ EOF
     if test "$build_old_libs" = yes; then
       if test "$pic_mode" != yes; then
        # Don't build PIC code
-       command="$base_compile $srcfile"
+       command="$base_compile $qsrcfile"
       else
-       command="$base_compile $srcfile $pic_flag"
+       command="$base_compile $qsrcfile $pic_flag"
       fi
       if test "$compiler_c_o" = yes; then
        command="$command -o $obj"