On Sun, Dec 23, 2007 at 10:33:14AM -0800, Yitzchak Scott-Thoennes wrote: > 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.
Yes, but that's not the problem. It's not passed on via the Makefile to any scripts the Makefile runs during its invocation by make. (As far as I can work out) I was trying to reduce the hackiness of http://public.activestate.com/cgi-bin/perlbrowse/p/31422 (because I want to do some other processing at make time, rather than Makefile.PL time) Nicholas Clark