One of the inherent design problems in MakeMaker is that it can't know
what make the user will use to the run the Makefile.  It has to guess
using $Config{make} and/or $^O. [1]  Or does it?

Crazy idea.  WriteMakefile() creates, not the real Makefile, but a stub.
It has all the targets of the real Makefile but all they do is call a
Perl program.  This generates the real Makefile, now knowing what make
the user used, and reissues the user's make command.

All the arguments to WriteMakefile() and command line arguments can be
trapped in the stub Makefile and repeated to generate the real Makefile.
The trouble is any MY customization methods, how do you ensure they are
taken into account when the real Makefile is generated?  I don't have
any solution for that other than using B::Deparse to dump them out into the
stub and that's just not reliable enough.

Anyhow, I have no plans to implement this this late in the game, just
thought I'd share.


[1]  There's not even a MAKE argument for Makefile.PL.  Maybe there
should be.

-- 
Michael G Schwern     [EMAIL PROTECTED]     http://www.pobox.com/~schwern
Just call me 'Moron Sugar'.
        http://www.somethingpositive.net/sp05182002.shtml

Reply via email to