=?unknown-8bit?B?RGFuaetsIFcu?= Crompton <[EMAIL PROTECTED]> writes:
>Hi,
>
>       due to library path ambiguity within Cygwin I've found that
>the Makefile PASTHU variable will cause the make to fail with:
>
>cd pTk && make -f Makefile all LIB="C:\Program Files\Microsoft SDK\Lib\.;c:\Program 
>Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\" LIBPERL_A="libperl.a" 
>LINKTYPE="dynamic" PREFIX="/usr" OPTIMIZE="-O2" PASTHRU_DEFINE="" PASTHRU_INC=""
>Syntax error: Unterminated quoted string
>make: *** [subdirs] Error 2
>
>       Did you spot the \" ? I kept missing it.
>
>       My ObHack for this was a space in PASTHRU's LIB variable.
>
>PASTHRU = LIB="$(LIB) "\
>                     ^ - here
>
>       I'm sure there is a different correct way to do this, but
>as I don't use the libs in the dir. I wanted something similar
>to
>       echo $$LIB | sed 's/\\/\\\\/g'
>
>which works, but doesn't use the internal $(LIB). This is probably
>a task for a Makefile hacker.
>
>
>blaze your trail

It is far from clear why PASTHRU is passing 'LIB' as it never sets it!
MakeMaker list care to comment?

Only places 'LIB=' occurs in Tk804 is PNG's sub makefiles.
There it is supposed to be name of 'AR' like command that 
builds .lib files from .obj files. So PASTHRU would be wrong.

Attached patch (for Tk) fixes up MakeMaker's PASTHRU to avoid the problem.





==== //depot/Tkutf8/Tk/MMutil.pm#20 - /home/p4work/Tkutf8/Tk/MMutil.pm ====
Index: Tkutf8/Tk/MMutil.pm
--- Tkutf8/Tk/MMutil.pm.~1~     Sat Mar 27 14:41:49 2004
+++ Tkutf8/Tk/MMutil.pm Sat Mar 27 14:41:49 2004
@@ -220,8 +220,13 @@
  my $str = $self->MM::pasthru;
  if ($str =~ s/^\s+INC=.*\n//m)
   {
-   return "\n#Do NOT pasthru INC for Tk - it is computed by subdir\n".$str;
+   $str = "# - Do NOT pasthru INC for Tk - it is computed by subdir\n$str"
+  }
+ if ($str =~ s/\bLIB="\$\(LIB\)"//)
+  {
+   $str = qq[# - Drop LIB="\$(LIB)" - not used\n$str];
   }
+ $str = "#Tk::MMutil pasthru\n$str";
  return $str;
 }
 
End of Patch.

Reply via email to