[Chicago-talk] makemaker hacking

Mike Fragassi frag at ripco.com
Thu Jan 12 10:21:43 PST 2006


I have a script that I want to run as part of the make process; it
(re)generates a file in MANIFEST.  It should only run on my
development/packaging host, when "make dist" is run, and not on the hosts
where it will be deployed.  I am using ExtUtils::MakeMaker.  How can I
specify this in Makefile.PL?  I realize that I can just put the code in
Makefile.PL itself (or use system()/backticks to call the script) but it'd
be better if it was run when I type 'make dist' instead of 'perl
Makefile.PL', in part because I don't see any way to force it to be
skipped on deployment hosts other than by including the development IP
address in Makefile.PL.  That would work as a hack but is brittle compared
to having the code be executed only after "make dist".  (Or some other
make target that is only meant to be run on the development host -- "make
disttest", maybe?)

Is there a way to do this with ExtUtils::MakeMaker at all, or perhaps with
Module::Build?

-- Mike F.

P.S.  I really, really, really wish there was a companion to the Perl
Testing "notebook" book that covered Perl module creation,
make-ing/build-ing, and distributing.  These would make for a nice
"Pragmatic Perl" bookshelf, along with Pro Perl Debugging, the Debugger
pocket reference and Perl Best Practices.



More information about the Chicago-talk mailing list