in reply to MakeMaker, and passing command line arguments along.

Its an open bug? Re: Passing MakeMaker args to Makefile.PL in subdirectory, Bug #28632 for ExtUtils-MakeMaker: MakeMaker does not set Makefile variables recursively
  • Comment on Re: MakeMaker, and passing command line arguments along.

Replies are listed 'Best First'.
Re^2: MakeMaker, and passing command line arguments along.
by syphilis (Archbishop) on Apr 16, 2010 at 09:59 UTC
    Its an open bug?

    Thanks for that. One of those links led me to XML::Parser and how it deals with the problem. And then I remembered that some of Tassilo von Parseval's modules parse the command line for INC and LIBS args, so I took a look at his Unix::Statgrab Makefile.PL.

    Seems to work fine if the top level Makefile.PL does:
    our %args = map { split /\s*=\s*/ } @ARGV; our $LIBS_LOC = $args{ LIBS } || "-lgmp"; our $INC_LOC = $args{ INC };
    and then the subdir Makefile.PL simply has to specify:
    WriteMakfile( .... LIBS => $LIBS_LOC, INC => $INC_LOC, .... );
    I haven't yet looked at any caveats with that approach. I'll get to that now.

    Thanks again.

    Cheers,
    Rob