EU::MM custom Makefile actions

Randy J. Ray rjray at blackperl.com
Mon Oct 1 20:17:30 BST 2007


David Cantrell wrote:
> I need to customise my Makefile.PL so that 'make clean' will, as well as
> doing its usual thang, also delete some extra files that get created
> when you run 'perl Makefile.PL'.  How do I do that?

When you call WriteMakefile(), add a new key/value pair:

WriteMakefile(...
               ...
               clean => { files => $extra },
               ...);

The value of "$extra" should be space-separated names. This is appended to the 
"rm" command directly, so you can use shell wildcards, etc.

Randy
-- 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Randy J. Ray        Sunnyvale, CA    http://www.rjray.org   rjray at blackperl.com

Silicon Valley Scale Modelers: http://www.svsm.org


More information about the london.pm mailing list