libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MinGW issue


From: Charles Wilson
Subject: Re: MinGW issue
Date: Sun, 10 Oct 2004 23:25:12 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 MultiZilla/1.6.4.0b

Albert Chin wrote:

Why did you eliminate the quoting, and the eval?

You had:

$run ${ECHO} EXPORTS > "$output_objdir/$output.def"
$run cat "$export_symbols" >> "$output_objdir/$output.def"

But if I were to use cat, I would've said

$run eval "${ECHO} EXPORTS "'> "$output_objdir/$output.def"'
$run eval 'cat < "$export_symbols" >> "$output_objdir/$output.def"'

just on the principle of minimum change (surely there was a reason the original version:

$run eval "${SED} -e '1iEXPORTS'"' < "$export_symbols" > "$output_objdir/$output.def"'

had such funky quoting, and used $run eval, right?)


I reviewed the original but didn't see anything worth eval'ing. The
original also had:
  export_symbols="$output_objdir/$output.exp"
  $run $RM $export_symbols

So, because there is no:
  $run eval "$RM $export_symbols"
I see no reason to eval. I think the original eval above was just
overly ambitious.


Nope, it looks like the funky quoting was important. Without it, mdemo-dryrun breaks, because

              $run ${ECHO} EXPORTS > "$output_objdir/$output.def"
              $run cat "$export_symbols" >> "$output_objdir/$output.def"

will create an empty file when $run = : (e.g. dryrun).

See attached.

--
Chuck

2004-10-10  Charles Wilson  <spam.protected>

        * config/ltmain.m4sh: Really don't require versions of GNU 
        sed newer than 3.02 for Cygwin and MinGW, and don't break
        dryrun mode.

Index: ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 ltmain.m4sh
--- ltmain.m4sh 10 Oct 2004 22:14:12 -0000      1.1.2.5
+++ ltmain.m4sh 11 Oct 2004 03:18:56 -0000
@@ -745,15 +745,16 @@
            $run eval "${SED} -n -e '/^: @address@hidden/d' -e 's/^.* 
\(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
            case $host in
            *cygwin* | *mingw* )
-              $run ${ECHO} EXPORTS > "$output_objdir/$output.def"
-              $run cat "$export_symbols" >> "$output_objdir/$output.def"
+              $run eval "${ECHO} EXPORTS "'> "$output_objdir/$output.def"'
+              $run eval 'cat "$export_symbols" >> "$output_objdir/$output.def"'
              ;;
            esac
          else
            $run eval "${SED} -e 's/\([[]][[.*^$]]\)/\\\1/g' -e 's/^/ /' -e 
's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
            case $host in
            *cygwin | *mingw* )
-             $run eval "${SED} -e '1iEXPORTS'"' < "$output_objdir/$output.exp" 
> "$output_objdir/$output.def"'
+             $run eval "${ECHO} EXPORTS "'> "$output_objdir/$output.def"'
+             $run eval 'cat "$output_objdir/$output.exp" >> 
"$output_objdir/$output.def"'
              ;;
            esac
            $run eval '$GREP -f "$output_objdir/$output.exp" < "$nlist" > 
"$nlist"T'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]