tokuhirom's blog

ExtUtils::MakeMaker generates Makefile on child directories.

EU::MM generates Makefile in child directory.

example

I put a 'Makefile.PL' as following:

use ExtUtils::MakeMaker;
WriteMakefile( NAME => 'PARENT');

And put 'child/Makefile.PL' as following:

use ExtUtils::MakeMaker;
WriteMakefile( NAME => 'CHILD');

And run the Makefile.PL, then you get following result:

Writing Makefile for CHILD
Writing Makefile for PARENT

WriteMakefile() function in parent runs child/Makefile.PL!

I did't know this behavior!! amazing!

How can I stop this behavior?

Use NORECURS option. It stops recursion.

use ExtUtils::MakeMaker;
WriteMakefile( NAME => 'PARENT', NORECURS => 1);
Created: 2012-11-09T06:49:08Z
Updated: 2012-11-09T06:49:08Z
comments powered by Disqus