On Mon, 9 Jun 2003, Robin Barker wrote:

> Patch 19704 included ExtUtils-MakeMaker-6.10_05
> (which was soon superseded by 6.10_06)
>
> I get the t/basic failures with Solaris 8, perl-5.8.0 and
> ExtUtils-MakeMaker-6.10_05, and with ExtUtils-MakeMaker-6.10_06.
>
> Both _05 and _06 are OK on Solaris 7.

It's a function of the 'make' program in use.  I suspect on your Solaris 7
system, it's actually GNU make that's getting called.

The problem is in MM_Unix.pm's oneliner() command, specifically, its use
of escape_newlines.  I suspect this has been in MakeMaker for a bit.

> lib/ExtUtils/t/basic.................
> #     Failed test (../lib/ExtUtils/t/basic.t at line 153)
> #          got: '256'
> #     expected: '0'
> # Backslash found where operator expected at -e line 1, near "} \"
> #     (Missing operator before  \?)
> # syntax error at -e line 1, near "} \"
> # Execution of -e aborted due to compilation errors.
> # *** Error code 255
> # make: Fatal error: Command failed for target `metafile_addtomanifest'
> #     Failed test (../lib/ExtUtils/t/basic.t at line 162)
> #          got: undef
> #     expected: 'Module meta-data (added by MakeMaker)'
> FAILED at test 43

Here's a very simple illustration.  Consider the following Makefile:
(I'm using PERL=echo to show what command is actually intended to be fed to perl.)

# Makefile start
PERL=echo

all:
        @$(PERL) -le 'eval {print "First line."} \
        or print  "Second line.";'

# Makefile end

Now, if I run it with GNU make I get

    -le eval {print "First line."} or print  "Second line.";

But if I run it with Sun's /usr/ccs/bin/make, I get

    -le eval {print "First line."} \
    or print  "Second line.";

Note that the trailing '\' is still there, and the data is still actually split
over two lines.  Whether or not that's legal perl syntax
depends on the contents of those particular lines.  In this case, it's not.

No, I don't know an easy way around this offhand.

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to