perl Makefile.PL side effect

barbie on 2004-01-09T12:38:56

In typing 'perl Makefile.PL' on the command line recently, I discovered a side effect. Aside from the Makefile.PL in the current directory, it will attempt to run all the other Makefile.PLs in any sub-directories. This wasn't expected, nor wanted. The problem with this is that at the top level I have a Makefile.PL that bundles all scripts/images/templates/etc and tests the whole shebang. Under other directories I have other Makefile.PLs that build a subset of the whole. However, two of them don't run in the directory they are stored in and as such the side effect of running 'perl Makefile.PL' fails from the top level.

This shouldn't have been unexpected as it's documented in the Description block of ExtUtils::MakeMaker, but then I'd never noticed that before. It took a bit of reading but what I was after was....

WriteMakefile( 'NORECURS' => 1, ... );

That's better :)


ah that's better than my hack

mako132 on 2004-01-09T15:25:18

My hack has always been (when installing) to rename a sub directory's Makefile.PL to foo_Makefile.PL so it gets skipped.