On Sun, December 23, 2007 9:56 am, Nicholas Clark wrote:
> As far as I can tell, when the core is building extentions, it invokes
> the Makefile.PL with PERL_CORE=1 on the command line, and from this
> MakeMaker
> sets PERL_CORE=1 inside the Makefile. In turn, MakeMaker contains rules to
>  extract files from .PL files.
>
> However, it seems that the information about "building under the core"
> isn't passed through in any way. Am I right? If so, what's the cleanest
> way to pass into a .PL file that we're running in a build under the core
> source directory?

Looking for prior art, I see ext/IO_Compress_Base/Makefile.PL
just checks $ENV{PERL_CORE}.  Oh, wait, it uses
ext/IO_Compress_Base/private/MakeUtil.pm, which does:

unless($ENV{PERL_CORE}) {
    $ENV{PERL_CORE} = 1 if grep { $_ eq 'PERL_CORE=1' } @ARGV;
}

Presumably, then, MakeMaker leaves @ARGV intact and queryable.


Reply via email to