Thursday, March 26, 2009

Module::Install Custom Makefile Targets

I'm using Module::Install to build a Perl module. I was trying to persuade Module::Install to add a custom Makefile target so that I could leverage all the hard work it had already done. I found nothing by searching or reading the documentation. It turns out to be pretty easy. Just put something like this in your Makefile.PL.
Makefile->postamble(qq{hi:\n\techo "Hello World!"});
That creates a new "hi" target in the Makefile.

0 comments: