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);