|CC:||makemaker [...] perl.org, bug-ExtUtils-MakeMaker [...] rt.cpan.org|
|Subject:||Re: MakeMaker on Cygwin when environment variables end in backslash|
|Date:||Tue, 6 Jun 2006 16:54:19 -0700|
|To:||"Ed Avis" <eda [...] waniasset.com>|
|From:||"Michael G Schwern" <schwern [...] gmail.com>|
On 6/6/06, Ed Avis <firstname.lastname@example.org> wrote: Show quoted text
> This is harmless to Windows programs but when using MakeMaker under > Cygwin, the trailing backslash causes errors a bit like this: > > % make subdirs > cd C && make -f Makefile all LIB="C:\Program Files\Microsoft Visual Studio > .NET 2003\SDK\v1.1\Lib\" LIBPERL_A="libperl.a" LINKTYPE="dynamic" > PREFIX="" OPTIMIZE="" PASTHRU_DEFINE="" PASTHRU_INC="" > /bin/sh: -c: line 0: unexpected EOF while looking for matching `"' > /bin/sh: -c: line 1: syntax error: unexpected end of file > make: *** [subdirs] Error 2 > > The backslash at the end of the double-quoted string confuses sh. This > could be fixed by putting a substitution in the Makefile:There's already a method in MakeMaker for quoting, quote_literal(). Trouble is it was introduced late in the game and there's lots of places which do not use it. This is one of them. The code which generates the above is, I think, ExtUtils::MM_Unix->pasthru() and it does not use quote_literal(). It should. Patches welcome.