For simple extensions make_ext.pl can emulate the entire MakeMaker/make dance.
authorNicholas Clark <nick@ccl4.org>
Thu, 27 Feb 2014 10:04:19 +0000 (11:04 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 2 Mar 2014 06:08:54 +0000 (07:08 +0100)
commitf6dd0e4f7c748bb11d6531b5d95c0d83d7dbb395
treeb5d212ebc6e7bba4e76f0eead987aeec42bc16be
parent3830cb7e9974e7471c7c3b0eb12e170a79dd55c3
For simple extensions make_ext.pl can emulate the entire MakeMaker/make dance.

For simple extensions consisting only of Perl modules and Pod, EU::MM
generates a Makefile where the only target that does any work as part of
'all' is 'pm_to_blib', and *that* is just running perl to call
ExtUtils::Installed::pm_to_blib() with those files as arguments, and then
touching pm_to_blib.

Because the top level Makefile's dependency rule for "is an extension built"
is looking for that file pm_to_blib, and all builds (and cleans) of
extension directories are performed by running make_ext.pl, not a direct
recursive make, it means that make_ext.pl can actually directly emulate the
entire work done by EU::MM and make in this particular case. This means that
we save (at least) three subprocesses:

* miniperl to run Makefile.PL
* make
* miniperl to run ExtUtils::Installed::pm_to_blib()

This change obviously adds some logic duplication, but it roughly halves the
time taken for `make test_prep` to figure out that nothing needs doing.
And obviously also saves at least that much time on the actual build, which
may well be 60 seconds / number of cores.
make_ext.pl