2 # MakeMaker default methods for VMS
3 # This package is inserted into @ISA of MakeMaker's MM before the
4 # built-in ExtUtils::MM_Unix methods if MakeMaker.pm is run under VMS.
6 # Author: Charles Bailey bailey@genetics.upenn.edu
8 package ExtUtils::MM_VMS;
9 $ExtUtils::MM_VMS::Revision=$ExtUtils::MM_VMS::Revision = '5.21 (15-Feb-1996)';
10 unshift @MM::ISA, 'ExtUtils::MM_VMS';
17 Exporter::import('ExtUtils::MakeMaker', '$Verbose', '&neatvalue');
20 sub eliminate_macros {
23 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
24 $self = $ExtUtils::MakeMaker::Parent[-1];
27 print "eliminate_macros('') = ||\n" if $Verbose >= 3;
30 my($npath) = unixify($path);
31 my($head,$macro,$tail);
33 # perform m##g in scalar context so it acts as an iterator
34 while ($npath =~ m#(.*?)\$\((\S+?)\)(.*)#g) {
36 ($head,$macro,$tail) = ($1,$2,$3);
37 ($macro = unixify($self->{$macro})) =~ s#/$##;
38 $npath = "$head$macro$tail";
41 print "eliminate_macros($path) = |$npath|\n" if $Verbose >= 3;
45 # Catchall routine to clean up problem macros. Expands macros in any directory
46 # specification, and expands expressions which are all macro, so that we can
47 # tell how long the expansion is, and avoid overrunning DCL's command buffer
48 # when MM[KS] is running.
50 my($self,$path,$force_path) = @_;
52 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
53 $self = $ExtUtils::MakeMaker::Parent[-1];
56 print "eliminate_macros('') = ||\n" if $Verbose >= 3;
59 my($fixedpath,$prefix,$name);
61 if ($path =~ m#^\$\(.+\)$# || $path =~ m#[/:>\]]#) {
62 if ($force_path or $path =~ /(?:DIR\)|\])$/) {
63 $fixedpath = vmspath($self->eliminate_macros($path));
66 $fixedpath = vmsify($self->eliminate_macros($path));
69 elsif ((($prefix,$name) = ($path =~ m#^\$\(([^\)]+)\)(.+)#)) && $self->{$prefix}) {
70 my($vmspre) = vmspath($self->{$prefix}) || ''; # is it a dir or just a name?
71 $fixedpath = ($vmspre ? $vmspre : $self->{$prefix}) . $name;
72 $fixedpath = vmspath($fixedpath) if $force_path;
76 $fixedpath = vmspath($fixedpath) if $force_path;
78 # Convert names without directory or type to paths
79 if (!$force_path and $fixedpath !~ /[:>(.\]]/) { $fixedpath = vmspath($fixedpath); }
80 print "fixpath($path) = |$fixedpath|\n" if $Verbose >= 3;
87 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
88 $self = $ExtUtils::MakeMaker::Parent[-1];
91 @dirs = grep($_,@dirs);
94 my($path) = (@dirs == 1 ? $dirs[0] : $self->catdir(@dirs));
95 my($spath,$sdir) = ($path,$dir);
96 $spath =~ s/.dir$//; $sdir =~ s/.dir$//;
97 $sdir = $self->eliminate_macros($sdir) unless $sdir =~ /^[\w\-]+$/;
98 $rslt = vmspath($self->eliminate_macros($spath)."/$sdir");
100 else { $rslt = vmspath($dir); }
101 print "catdir(",join(',',@_[1..$#_]),") = |$rslt|\n" if $Verbose >= 3;
106 my($self,@files) = @_;
108 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
109 $self = $ExtUtils::MakeMaker::Parent[-1];
111 my($file) = pop @files;
112 @files = grep($_,@files);
115 my($path) = (@files == 1 ? $files[0] : $self->catdir(@files));
118 if ( $spath =~ /^[^\)\]\/:>]+\)$/ && basename($file) eq $file) { $rslt = "$spath$file"; }
120 $rslt = $self->eliminate_macros($spath);
121 $rslt = vmsify($rslt.($rslt ? '/' : '').unixify($file));
124 else { $rslt = vmsify($file); }
125 print "catfile(",join(',',@_[1..$#_]),") = |$rslt|\n" if $Verbose >= 3;
130 # Default name is taken from the directory name if it's not passed in.
131 # Since VMS filenames are case-insensitive, we actually look in the
132 # extension files to find the Mixed-case name
136 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
137 $self = $ExtUtils::MakeMaker::Parent[-1];
142 $defname = $ENV{'DEFAULT'};
143 $defname =~ s:.*?([^.\]]+)\]:$1:
144 unless ($defname =~ s:.*[.\[]ext\.(.*)\]:$1:i);
145 $defname =~ s#[.\]]#::#g;
146 ($defpm = $defname) =~ s/.*:://;
147 if (open(PM,"${defpm}.pm")){
149 if (/^\s*package\s+([^;]+)/i) {
154 print STDOUT "Warning (non-fatal): Couldn't find package name in ${defpm}.pm;\n\t",
155 "defaulting package name to $defname\n"
160 print STDOUT "Warning (non-fatal): Couldn't find ${defpm}.pm;\n\t",
161 "defaulting package name to $defname\n";
163 $defname =~ s#[\-_][\d.\-]+$##;
169 my($self, $ver, $names, $dirs, $trace) = @_;
171 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
172 $self = $ExtUtils::MakeMaker::Parent[-1];
174 my($name, $dir,$vmsfile,@cand);
176 print "Looking for perl $ver by these names:\n";
177 print "\t@$names,\n";
178 print "in these dirs:\n";
181 foreach $dir (@$dirs){
182 next unless defined $dir; # $self->{PERL_SRC} may be undefined
183 foreach $name (@$names){
184 if ($name !~ m![/:>\]]!) { push(@cand,$self->catfile($dir,$name)); }
185 else { push(@cand,$self->fixpath($name)); }
188 foreach $name (sort { length($a) <=> length($b) } @cand) {
189 print "Checking $name\n" if ($trace >= 2);
190 next unless $vmsfile = $self->maybe_command($name);
191 print "Executing $vmsfile\n" if ($trace >= 2);
192 if (`MCR $vmsfile -e "require $ver; print ""VER_OK\n"""` =~ /VER_OK/) {
193 print "Using PERL=MCR $vmsfile\n" if $trace;
194 return "MCR $vmsfile"
197 print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
198 0; # false and not empty
204 while ($dir = $ENV{'DCL$PATH;' . $i++}) { push(@dirs,$dir); }
210 my($self,$file) = @_;
211 return $file if -x $file && ! -d _;
212 return "$file.exe" if -x "$file.exe";
213 if ($file !~ m![/:>\]]!) {
214 my($shrfile) = 'Sys$Share:' . $file;
215 return $file if -x $shrfile && ! -d _;
216 return "$file.exe" if -x "$shrfile.exe";
222 sub maybe_command_in_dirs { # $ver is optional argument if looking for perl
223 my($self, $names, $dirs, $trace, $ver) = @_;
225 foreach $dir (@$dirs){
226 next unless defined $dir; # $self->{PERL_SRC} may be undefined
227 foreach $name (@$names){
229 if ($self->file_name_is_absolute($name)) {
232 $abs = $self->catfile($dir, $name);
234 print "Checking $abs for $name\n" if ($trace >= 2);
235 next unless $tryabs = $self->maybe_command($abs);
236 print "Substituting $tryabs instead of $abs\n"
237 if ($trace >= 2 and $tryabs ne $abs);
240 print "Executing $abs\n" if ($trace >= 2);
241 if (`$abs -e 'require $ver; print "VER_OK\n" ' 2>&1` =~ /VER_OK/) {
242 print "Using PERL=$abs\n" if $trace;
245 } else { # Do not look for perl
254 my($self,$file) = @_;
255 return $file if -r $file && ! -d _;
256 return "$file.pl" if -r "$file.pl" && ! -d _;
260 sub file_name_is_absolute {
262 $file =~ m!^/! or $file =~ m![:<\[][^.]!;
266 sub replace_manpage_separator {
268 $man = unixify($man);
277 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
278 $self = $ExtUtils::MakeMaker::Parent[-1];
281 $self->{NOOP} = "\t@ Continue";
282 $self->{FIRST_MAKEFILE} ||= 'Descrip.MMS';
283 $self->{MAKE_APERL_FILE} ||= 'Makeaperl.MMS';
284 $self->{MAKEFILE} ||= $self->{FIRST_MAKEFILE};
285 $self->{NOECHO} ||= '@ ';
286 $self->{RM_F} = '$(PERL) -e "foreach (@ARGV) { 1 while ( -d $_ ? rmdir $_ : unlink $_)}"';
287 $self->{RM_RF} = '$(PERL) "-I$(PERL_LIB)" -e "use File::Path; @dirs = map(VMS::Filespec::unixify($_),@ARGV); rmtree(\@dirs,0,0)"';
288 $self->{TOUCH} = '$(PERL) -e "$t=time; foreach (@ARGV) { -e $_ ? utime($t,$t,@ARGV) : (open(F,qq(>$_)),close F)}"';
289 $self->{CHMOD} = '$(PERL) -e "chmod @ARGV"'; # expect Unix syntax from MakeMaker
290 $self->{CP} = 'Copy/NoConfirm';
291 $self->{MV} = 'Rename/NoConfirm';
292 $self->{UMASK_NULL} = "\t!";
293 &ExtUtils::MM_Unix::init_others;
300 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
301 $self = $ExtUtils::MakeMaker::Parent[-1];
305 if ($self->{DEFINE} ne '') {
306 my(@defs) = split(/\s+/,$self->{DEFINE});
307 foreach $def (@defs) {
310 $def = "\"$def\"" if $def =~ /=/;
312 $self->{DEFINE} = join ',',@defs;
315 if ($self->{OBJECT} =~ /\s/) {
316 $self->{OBJECT} =~ s/(\\)?\n+\s+/ /g;
317 $self->{OBJECT} = map($self->fixpath($_),split(/,?\s+/,$self->{OBJECT}));
319 $self->{LDFROM} = join(' ',map($self->fixpath($_),split(/,?\s+/,$self->{LDFROM})));
321 if ($self->{'INC'} && $self->{INC} !~ m!/Include=!i) {
322 my(@val) = ( '/Include=(' );
323 my(@includes) = split(/\s+/,$self->{INC});
325 foreach (@includes) {
327 push @val,', ' if $plural++;
328 push @val,$self->fixpath($_,1);
330 $self->{INC} = join('',@val,')');
333 # Fix up directory specs
334 $self->{ROOTEXT} = $self->{ROOTEXT} ? $self->fixpath($self->{ROOTEXT},1)
336 foreach $macro ( qw [
337 INST_LIB INST_ARCHLIB INST_EXE INSTALLPRIVLIB INSTALLARCHLIB
338 INSTALLBIN PERL_LIB PERL_ARCHLIB PERL_INC PERL_SRC FULLEXT
339 INST_MAN1DIR INSTALLMAN1DIR INST_MAN3DIR INSTALLMAN3DIR
340 INSTALLSITELIB INSTALLSITEARCH SITELIBEXP SITEARCHEXP ] ) {
341 next unless defined $self->{$macro};
342 $self->{$macro} = $self->fixpath($self->{$macro},1);
344 $self->{PERL_VMS} = $self->catdir($self->{PERL_SRC},q(VMS))
345 if ($self->{PERL_SRC});
350 foreach $macro ( qw[LIBPERL_A FIRST_MAKEFILE MAKE_APERL_FILE MYEXTLIB] ) {
351 next unless defined $self->{$macro};
352 $self->{$macro} = $self->fixpath($self->{$macro});
356 AR_STATIC_ARGS NAME DISTNAME NAME_SYM VERSION VERSION_SYM XS_VERSION
357 INST_LIB INST_ARCHLIB INST_EXE PREFIX INSTALLDIRS INSTALLPRIVLIB
358 INSTALLARCHLIB INSTALLSITELIB INSTALLSITEARCH INSTALLBIN PERL_LIB
359 PERL_ARCHLIB SITELIBEXP SITEARCHEXP LIBPERL_A MYEXTLIB
360 FIRST_MAKEFILE MAKE_APERL_FILE PERLMAINCC PERL_SRC PERL_VMS
361 PERL_INC PERL FULLPERL
363 next unless defined $self->{$tmp};
364 push @m, "$tmp = $self->{$tmp}\n";
369 VERSION_MACRO = VERSION
370 DEFINE_VERSION = "$(VERSION_MACRO)=""$(VERSION)"""
371 XS_VERSION_MACRO = XS_VERSION
372 XS_DEFINE_VERSION = "$(XS_VERSION_MACRO)=""$(XS_VERSION)"""
374 MAKEMAKER = ],$self->catfile($self->{PERL_LIB},'ExtUtils','MakeMaker.pm'),qq[
375 MM_VERSION = $ExtUtils::MakeMaker::VERSION
376 MM_REVISION = $ExtUtils::MakeMaker::Revision
377 MM_VMS_REVISION = $ExtUtils::MM_VMS::Revision
379 # FULLEXT = Pathname for extension directory (eg DBD/Oracle).
380 # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
381 # ROOTEXT = Directory part of FULLEXT with leading slash (eg /DBD)
382 # DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
386 FULLEXT BASEEXT ROOTEXT DLBASE VERSION_FROM INC DEFINE OBJECT
389 next unless defined $self->{$tmp};
390 push @m, "$tmp = $self->{$tmp}\n";
395 # Handy lists of source code files:
396 XS_FILES = ',join(', ', sort keys %{$self->{XS}}),'
397 C_FILES = ',join(', ', @{$self->{C}}),'
398 O_FILES = ',join(', ', @{$self->{O_FILES}} ),'
399 H_FILES = ',join(', ', @{$self->{H}}),'
400 MAN1PODS = ',join(', ', sort keys %{$self->{MAN1PODS}}),'
401 MAN3PODS = ',join(', ', sort keys %{$self->{MAN3PODS}}),'
406 INST_MAN1DIR INSTALLMAN1DIR MAN1EXT INST_MAN3DIR INSTALLMAN3DIR MAN3EXT
408 next unless defined $self->{$tmp};
409 push @m, "$tmp = $self->{$tmp}\n";
413 .SUFFIXES : .xs .c .cpp .cxx \$(OBJ_EXT)
415 # Here is the Config.pm that we are using/depend on
416 CONFIGDEP = \$(PERL_ARCHLIB)Config.pm, \$(PERL_INC)config.h \$(VERSION_FROM)
418 # Where to put things:
419 INST_LIBDIR = ",($self->{'INST_LIBDIR'} = $self->catdir($self->{INST_LIB},$self->{ROOTEXT})),"
420 INST_ARCHLIBDIR = ",($self->{'INST_ARCHLIBDIR'} = $self->catdir($self->{INST_ARCHLIB},$self->{ROOTEXT})),"
422 INST_AUTODIR = ",($self->{'INST_AUTODIR'} = $self->catdir($self->{INST_LIB},'auto',$self->{FULLEXT})),'
423 INST_ARCHAUTODIR = ',($self->{'INST_ARCHAUTODIR'} = $self->catdir($self->{INST_ARCHLIB},'auto',$self->{FULLEXT})),'
426 if ($self->has_link_code()) {
428 INST_STATIC = $(INST_ARCHAUTODIR)$(BASEEXT)$(LIB_EXT)
429 INST_DYNAMIC = $(INST_ARCHAUTODIR)$(BASEEXT).$(DLEXT)
430 INST_BOOT = $(INST_ARCHAUTODIR)$(BASEEXT).bs
437 EXPORT_LIST = $(BASEEXT).opt
438 PERL_ARCHIVE = ',($ENV{'PERLSHR'} ? $ENV{'PERLSHR'} : 'Sys$Share:PerlShr.Exe'),'
443 INST_PM = ',join(', ',map($self->fixpath($_),sort values %{$self->{PM}})),'
453 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
454 $self = $ExtUtils::MakeMaker::Parent[-1];
458 # $self->{NAME} might depend on some other libraries.
459 # (These comments may need revising:)
461 # Dependent libraries can be linked in one of three ways:
463 # 1. (For static extensions) by the ld command when the perl binary
464 # is linked with the extension library. See EXTRALIBS below.
466 # 2. (For dynamic extensions) by the ld command when the shared
467 # object is built/linked. See LDLOADLIBS below.
469 # 3. (For dynamic extensions) by the DynaLoader when the shared
470 # object is loaded. See BSLOADLIBS below.
472 # EXTRALIBS = List of libraries that need to be linked with when
473 # linking a perl binary which includes this extension
474 # Only those libraries that actually exist are included.
475 # These are written to a file and used when linking perl.
477 # LDLOADLIBS = List of those libraries which can or must be linked into
478 # the shared library when created using ld. These may be
479 # static or dynamic libraries.
480 # LD_RUN_PATH is a colon separated list of the directories
481 # in LDLOADLIBS. It is passed as an environment variable to
482 # the process that links the shared library.
484 # BSLOADLIBS = List of those libraries that are needed but can be
485 # linked in dynamically at run time on this platform.
486 # SunOS/Solaris does not need this because ld records
487 # the information (from LDLOADLIBS) into the object file.
488 # This list is used to create a .bs (bootstrap) file.
490 EXTRALIBS = ",map($self->fixpath($_) . ' ',$self->{'EXTRALIBS'}),"
491 BSLOADLIBS = ",map($self->fixpath($_) . ' ',$self->{'BSLOADLIBS'}),"
492 LDLOADLIBS = ",map($self->fixpath($_) . ' ',$self->{'LDLOADLIBS'}),"\n";
499 my($self,$libperl) = @_;
501 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
502 $self = $ExtUtils::MakeMaker::Parent[-1];
504 my($cmd,$quals) = ($Config{'cc'},$Config{'ccflags'});
507 ( $name = $self->{NAME} . "_cflags" ) =~ s/:/_/g ;
508 print STDOUT "Unix shell script ".$Config{"$self->{'BASEEXT'}_cflags"}.
509 " required to modify CC command for $self->{'BASEEXT'}\n"
512 # Deal with $self->{DEFINE} here since some C compilers pay attention
513 # to only one /Define clause on command line, so we have to
514 # conflate the ones from $Config{'cc'} and $self->{DEFINE}
515 if ($quals =~ m:(.*)/define=\(?([^\(\/\)\s]+)\)?(.*)?:i) {
516 $quals = "$1/Define=($2," . ($self->{DEFINE} ? "$self->{DEFINE}," : '') .
517 "\$(DEFINE_VERSION),\$(XS_DEFINE_VERSION))$3";
520 $quals .= '/Define=(' . ($self->{DEFINE} ? "$self->{DEFINE}," : '') .
521 '$(DEFINE_VERSION),$(XS_DEFINE_VERSION))';
524 $libperl or $libperl = $self->{LIBPERL_A} || "libperl.olb";
525 if ($libperl =~ /libperl(\w+)\./i) {
527 my(%map) = ( 'D' => 'DEBUGGING', 'E' => 'EMBED', 'M' => 'MULTIPLICITY',
528 'DE' => 'DEBUGGING,EMBED', 'DM' => 'DEBUGGING,MULTIPLICITY',
529 'EM' => 'EMBED,MULTIPLICITY', 'DEM' => 'DEBUGGING,EMBED,MULTIPLICITY' );
530 $quals =~ s:/define=\(([^\)]+)\):/Define=($1,$map{$type}):i
533 # Likewise with $self->{INC} and /Include
534 my($incstr) = '/Include=($(PERL_INC)';
535 if ($self->{'INC'}) {
536 my(@includes) = split(/\s+/,$self->{INC});
537 foreach (@includes) {
539 $incstr .= ', '.$self->fixpath($_,1);
542 if ($quals =~ m:(.*)/include=\(?([^\(\/\)\s]+)\)?(.*):i) {
543 $quals = "$1$incstr,$2)$3";
545 else { $quals .= "$incstr)"; }
548 if ($Config{'vms_cc_type'} ne 'decc') {
551 ',$self->{NOECHO},'If F$TrnLnm("Sys").eqs."" Then Define/NoLog SYS ',
552 ($Config{'vms_cc_type'} eq 'gcc' ? 'GNU_CC_Include:[VMS]'
557 push(@m, "CCCMD = $cmd$quals\n");
559 $self->{CONST_CCCMD} = join('',@m);
563 # --- Tool Sections ---
566 my($self, %attribs) = @_;
568 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
569 $self = $ExtUtils::MakeMaker::Parent[-1];
572 $asl = "\$AutoSplit::Maxlen=$attribs{MAXLEN};" if $attribs{MAXLEN};
574 # Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
575 AUTOSPLITFILE = $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use AutoSplit;}.$asl.q{ AutoSplit::autosplit($ARGV[0], $ARGV[1], 0, 1, 1) ;"
582 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
583 $self = $ExtUtils::MakeMaker::Parent[-1];
585 my($xsdir) = $self->catdir($self->{PERL_LIB},'ExtUtils');
586 # drop back to old location if xsubpp is not in new location yet
587 $xsdir = $self->catdir($self->{PERL_SRC},'ext') unless (-f $self->catfile($xsdir,'xsubpp'));
588 my(@tmdeps) = '$(XSUBPPDIR)typemap';
589 if( $self->{TYPEMAPS} ){
591 foreach $typemap (@{$self->{TYPEMAPS}}){
593 warn "Typemap $typemap not found.\n";
596 push(@tmdeps, $self->fixpath($typemap));
600 push(@tmdeps, "typemap") if -f "typemap";
601 my(@tmargs) = map("-typemap $_", @tmdeps);
602 if( exists $self->{XSOPT} ){
603 unshift( @tmargs, $self->{XSOPT} );
606 my $xsubpp_version = $self->xsubpp_version($self->catfile($xsdir,'xsubpp'));
608 # What are the correct thresholds for version 1 && 2 Paul?
609 if ( $xsubpp_version > 1.923 ){
610 $self->{XSPROTOARG} = '' unless defined $self->{XSPROTOARG};
612 if (defined $self->{XSPROTOARG} && $self->{XSPROTOARG} =~ /\-prototypes/) {
613 print STDOUT qq{Warning: This extension wants to pass the switch "-prototypes" to xsubpp.
614 Your version of xsubpp is $xsubpp_version and cannot handle this.
615 Please upgrade to a more recent version of xsubpp.
618 $self->{XSPROTOARG} = "";
623 XSUBPPDIR = ".$self->fixpath($xsdir,1)."
624 XSUBPP = \$(PERL) \"-I\$(PERL_ARCHLIB)\" \"-I\$(PERL_LIB)\" \$(XSUBPPDIR)xsubpp
625 XSPROTOARG = $self->{XSPROTOARG}
634 my($self,$xsubpp) = @_;
637 # try to figure out the version number of the xsubpp on the system
639 # first try the -v flag, introduced in 1.921 & 2.000a2
641 my $command = "$self->{PERL} $xsubpp -v";
642 print "Running: $command\n" if $Verbose;
643 $version = `$command` ;
644 warn "Running '$command' exits with status " . $? unless ($? & 1);
647 return $1 if $version =~ /^xsubpp version (.*)/ ;
649 # nope, then try something else
652 my ($file) = 'temp' ;
653 $counter++ while -e "$file$counter"; # don't overwrite anything
657 open(F, ">$file") or die "Cannot open file '$file': $!\n" ;
659 MODULE = fred PACKAGE = fred
668 $command = "$self->{PERL} $xsubpp $file";
669 print "Running: $command\n" if $Verbose;
670 my $text = `$command` ;
671 warn "Running '$command' exits with status " . $? unless ($? & 1);
674 # gets 1.2 -> 1.92 and 2.000a1
675 return $1 if $text =~ /automatically by xsubpp version ([\S]+)\s*/ ;
677 # it is either 1.0 or 1.1
678 return 1.1 if $text =~ /^Warning: ignored semicolon/ ;
680 # none of the above, so 1.0
688 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
689 $self = $ExtUtils::MakeMaker::Parent[-1];
692 # Assumes \$(MMS) invokes MMS or MMK
693 # (It is assumed in some cases later that the default makefile name
694 # (Descrip.MMS for MM[SK]) is used.)
695 USEMAKEFILE = /Descrip=
698 MAKEFILE = Descrip.MMS
700 TOUCH = $self->{TOUCH}
701 CHMOD = $self->{CHMOD}
705 RM_RF = $self->{RM_RF}
706 UMASK_NULL = $self->{UMASK_NULL}
707 MKPATH = Create/Directory
708 EQUALIZE_TIMESTAMP = \$(PERL) -we "open F,qq{>\$ARGV[1]};close F;utime(0,(stat(\$ARGV[0]))[9]+1,\$ARGV[1])"
709 WARN_IF_OLD_PACKLIST = \$(PERL) -e "if (-f \$ARGV[0]){print qq[WARNING: Old package found (\$ARGV[0]); please check for collisions\\n]}"
710 MOD_INSTALL = \$(PERL) "-I\$(PERL_LIB)" "-MExtUtils::Install" -e "install({split(' ',<STDIN>)},1);"
711 DOC_INSTALL = \$(PERL) -e "@ARGV=split('|',<STDIN>);print '=head3 ',scalar(localtime),': C<',shift,qq[>\\n\\n=over 4\\n\\n];while(\$key=shift && \$val=shift){print qq[=item *\\n\\nC<\$key: \$val>\\n\\n];}print qq[=back\\n\\n]"
712 UNINSTALL = \$(PERL) "-I\$(PERL_LIB)" "-MExtUtils::Install" -e "uninstall(\$ARGV[0],1);"
718 my($self, %attribs) = @_;
720 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
721 $self = $ExtUtils::MakeMaker::Parent[-1];
723 # VERSION should be sanitised before use as a file name
724 my($name) = $attribs{NAME} || '$(DISTVNAME)';
725 my($zip) = $attribs{ZIP} || 'zip';
726 my($zipflags) = $attribs{ZIPFLAGS} || '-Vu';
727 my($suffix) = $attribs{SUFFIX} || '';
728 my($shar) = $attribs{SHAR} || 'vms_share';
729 my($preop) = $attribs{PREOP} || '!'; # e.g., update MANIFEST
730 my($postop) = $attribs{POSTOP} || '!';
731 my($dist_cp) = $attribs{DIST_CP} || 'best';
732 my($dist_default) = $attribs{DIST_DEFAULT} || 'zipdist';
735 $src = "[.$src]" unless $src =~ /\[/;
737 $src .= '*.*' if $src =~ /\]$/;
740 DISTVNAME = \$(DISTNAME)-\$(VERSION_SYM)
749 DIST_DEFAULT = $dist_default
754 # --- Translation Sections ---
759 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
760 $self = $ExtUtils::MakeMaker::Parent[-1];
762 return '' unless $self->needs_linking();
765 $(CCCMD) $(CCCDLFLAGS) $(MMS$TARGET_NAME).c
772 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
773 $self = $ExtUtils::MakeMaker::Parent[-1];
775 return '' unless $self->needs_linking();
778 $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $(MMS$TARGET_NAME).xs >$(MMS$TARGET)
782 sub xs_o { # many makes are too dumb to use xs_c then c_o
785 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
786 $self = $ExtUtils::MakeMaker::Parent[-1];
788 return '' unless $self->needs_linking();
791 $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $(MMS$TARGET_NAME).xs >$(MMS$TARGET_NAME).c
792 $(CCCMD) $(CCCDLFLAGS) $(MMS$TARGET_NAME).c
797 # --- Target Sections ---
803 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
804 $self = $ExtUtils::MakeMaker::Parent[-1];
808 all :: config $(INST_PM) subdirs linkext manifypods
811 subdirs :: $(MYEXTLIB)
814 config :: $(MAKEFILE) $(INST_LIBDIR).exists
817 config :: $(INST_ARCHAUTODIR).exists
820 config :: $(INST_AUTODIR).exists
825 config :: Version_check
827 } unless $self->{PARENT} or ($self->{PERL_SRC} && $self->{INSTALLDIRS} eq "perl");
830 push @m, $self->dir_target(qw[$(INST_AUTODIR) $(INST_LIBDIR) $(INST_ARCHAUTODIR)]);
831 if (%{$self->{MAN1PODS}}) {
833 config :: $(INST_MAN1DIR).exists
836 push @m, $self->dir_target(qw[$(INST_MAN1DIR)]);
838 if (%{$self->{MAN3PODS}}) {
840 config :: $(INST_MAN3DIR).exists
843 push @m, $self->dir_target(qw[$(INST_MAN3DIR)]);
847 $(O_FILES) : $(H_FILES)
848 ' if @{$self->{O_FILES} || []} && @{$self->{H} || []};
852 perldoc ExtUtils::MakeMaker
857 },$self->{NOECHO},q{$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -
858 "-MExtUtils::MakeMaker=Version_check" -e "&Version_check('$(MM_VERSION)')"
866 my($self,%attribs) = @_;
868 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
869 $self = $ExtUtils::MakeMaker::Parent[-1];
872 return '' unless $self->needs_linking();
874 my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
875 my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
876 my($srcdir)= $attribs{PERL_SRC} || $self->{PERL_SRC} || '';
879 unless ($self->{SKIPHASH}{'dynamic'}) {
881 dynamic :: rtls.opt $(INST_ARCHAUTODIR)$(BASEEXT).opt
885 my($opt) = $self->catfile($srcdir,'perlshr.opt');
886 push(@m,"# Depend on $(BASEEXT).opt to insure we copy here *after* autogenerating (wrong) rtls.opt in Mksymlists
887 rtls.opt : $opt \$(BASEEXT).opt
888 Copy/Log $opt Sys\$Disk:[]rtls.opt
893 # rtls.opt is built in the same step as $(BASEEXT).opt
894 rtls.opt : $(BASEEXT).opt
895 $(TOUCH) $(MMS$TARGET)
901 static :: $(INST_ARCHAUTODIR)$(BASEEXT).opt
903 ') unless $self->{SKIPHASH}{'static'};
906 $(INST_ARCHAUTODIR)$(BASEEXT).opt : $(BASEEXT).opt
907 $(CP) $(MMS$SOURCE) $(MMS$TARGET)
909 $(BASEEXT).opt : Makefile.PL
910 $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Mksymlists;" -
911 ',qq[-e "Mksymlists('NAME' => '$self->{NAME}', 'DL_FUNCS' => ],
912 neatvalue($funcs),q[, 'DL_VARS' => ],neatvalue($vars),')"
913 $(PERL) -e "print ""$(INST_STATIC)/Include=$(BASEEXT)\n$(INST_STATIC)/Library\n"";" >>$(MMS$TARGET)
920 # --- Dynamic Loading Sections ---
923 my($self, %attribs) = @_;
925 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
926 $self = $ExtUtils::MakeMaker::Parent[-1];
928 return '' unless $self->needs_linking(); #might be because of a subdir
930 return '' unless $self->has_link_code();
932 my($otherldflags) = $attribs{OTHERLDFLAGS} || "";
933 my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
937 OTHERLDFLAGS = $otherldflags
938 INST_DYNAMIC_DEP = $inst_dynamic_dep
942 $(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt rtls.opt $(INST_ARCHAUTODIR).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
943 ',$self->{NOECHO},'$(MKPATH) $(INST_ARCHAUTODIR)
944 Link $(LDFLAGS) /Shareable=$(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,rtls.opt/Option,$(PERL_INC)perlshr_attr.opt/Option
947 push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
952 my($self, %attribs) = @_;
954 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
955 $self = $ExtUtils::MakeMaker::Parent[-1];
959 ' unless $self->has_link_code();
961 BOOTSTRAP = '."$self->{BASEEXT}.bs".'
963 # As MakeMaker mkbootstrap might not write a file (if none is required)
964 # we use touch to prevent make continually trying to remake it.
965 # The DynaLoader only reads a non-empty file.
966 $(BOOTSTRAP) : $(MAKEFILE) '."$self->{BOOTDEP}".' $(INST_ARCHAUTODIR).exists
967 '.$self->{NOECHO}.'Write Sys$Output "Running mkbootstrap for $(NAME) ($(BSLOADLIBS))"
968 '.$self->{NOECHO}.'$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -
969 -e "use ExtUtils::Mkbootstrap; Mkbootstrap(\'$(BASEEXT)\',\'$(BSLOADLIBS)\');"
970 '.$self->{NOECHO}.' $(TOUCH) $(MMS$TARGET)
972 $(INST_BOOT) : $(BOOTSTRAP) $(INST_ARCHAUTODIR).exists
973 '.$self->{NOECHO}.'$(RM_RF) $(INST_BOOT)
974 - $(CP) $(BOOTSTRAP) $(INST_BOOT)
977 # --- Static Loading Sections ---
982 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
983 $self = $ExtUtils::MakeMaker::Parent[-1];
985 return '' unless $self->needs_linking();
990 ' unless ($self->{OBJECT} or @{$self->{C} || []} or $self->{MYEXTLIB});
994 # Rely on suffix rule for update action
995 $(OBJECT) : $(INST_ARCHAUTODIR).exists
997 $(INST_STATIC) : $(OBJECT) $(MYEXTLIB)
999 # If this extension has it's own library (eg SDBM_File)
1000 # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
1001 push(@m, ' $(CP) $(MYEXTLIB) $(MMS$TARGET)',"\n") if $self->{MYEXTLIB};
1004 If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET)
1005 Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)
1006 ',$self->{NOECHO},'$(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR)extralibs.ld\';print F qq[$(EXTRALIBS)\n];close F;"
1008 push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
1013 sub installpm_x { # called by installpm perl file
1014 my($self, $dist, $inst, $splitlib) = @_;
1016 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1017 $self = $ExtUtils::MakeMaker::Parent[-1];
1019 if ($inst =~ m!#!) {
1020 warn "Warning: MM[SK] would have problems processing this file: $inst, SKIPPED\n";
1023 $inst = $self->fixpath($inst);
1024 $dist = $self->fixpath($dist);
1025 my($instdir) = $inst =~ /([^\)]+\))[^\)]*$/ ? $1 : dirname($inst);
1029 $inst : $dist \$(MAKEFILE) ${instdir}.exists \$(INST_ARCHAUTODIR).exists
1030 ",' ',$self->{NOECHO},'$(RM_F) $(MMS$TARGET)
1031 ',$self->{NOECHO},'$(CP) ',"$dist $inst",'
1032 $(CHMOD) 644 $(MMS$TARGET)
1034 push(@m, ' $(AUTOSPLITFILE) $(MMS$TARGET) ',
1035 $self->catdir($splitlib,'auto')."\n\n")
1036 if ($splitlib and $inst =~ /\.pm$/);
1037 push(@m,$self->dir_target($instdir));
1044 my($self, %attribs) = @_;
1046 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1047 $self = $ExtUtils::MakeMaker::Parent[-1];
1049 return "\nmanifypods :\n\t\$(NOOP)\n" unless %{$self->{MAN3PODS}};
1051 my($pod2man_exe,$found_pod2man);
1052 if (defined $self->{PERL_SRC}) {
1053 $pod2man_exe = $self->catfile($self->{PERL_SRC},'pod','pod2man');
1055 $pod2man_exe = $self->catfile($Config{bin},'pod2man');
1057 if ($pod2man_exe = $self->perl_script($pod2man_exe)) { $found_pod2man = 1; }
1059 # No pod2man but some MAN3PODS to be installed
1062 Warning: I could not locate your pod2man program. As a last choice,
1063 I will look for the file to which the logical name POD2MAN
1064 points when MMK is invoked.
1067 $pod2man_exe = "pod2man";
1071 qq[POD2MAN_EXE = $pod2man_exe\n],
1072 q[POD2MAN = $(PERL) -we "%m=@ARGV;for (keys %m){" -
1073 -e "system(""MCR $^X $(POD2MAN_EXE) $_ >$m{$_}"");}"
1075 push @m, "\nmanifypods : ";
1076 push @m, join " ", keys %{$self->{MAN1PODS}}, keys %{$self->{MAN3PODS}};
1078 if (%{$self->{MAN1PODS}} || %{$self->{MAN3PODS}}) {
1080 foreach $pod (sort keys %{$self->{MAN1PODS}}) {
1081 push @m, qq[\t\@- If F\$Search("\$(POD2MAN_EXE)").nes."" Then \$(POD2MAN) ];
1082 push @m, "$pod $self->{MAN1PODS}{$pod}\n";
1084 foreach $pod (sort keys %{$self->{MAN3PODS}}) {
1085 push @m, qq[\t\@- If F\$Search("\$(POD2MAN_EXE)").nes."" Then \$(POD2MAN) ];
1086 push @m, "$pod $self->{MAN3PODS}{$pod}\n";
1096 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1097 $self = $ExtUtils::MakeMaker::Parent[-1];
1099 return "" unless $self->{PL_FILES};
1101 foreach $plfile (sort keys %{$self->{PL_FILES}}) {
1103 all :: $self->{PL_FILES}->{$plfile}
1106 $self->{PL_FILES}->{$plfile} :: $plfile
1107 ",' $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" '," $plfile
1117 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1118 $self = $ExtUtils::MakeMaker::Parent[-1];
1120 return '' unless $self->{EXE_FILES} && ref $self->{EXE_FILES} eq "ARRAY";
1121 return '' unless @{$self->{EXE_FILES}};
1122 my(@m, $from, $to, %fromto, @to, $line);
1123 for $from (@{$self->{EXE_FILES}}) {
1124 my($path) = '$(INST_EXE)' . basename($from);
1125 local($_) = $path; # backward compatibility
1126 $to = $self->libscan($path);
1127 print "libscan($from) => '$to'\n" if ($Verbose >=2);
1130 @to = values %fromto;
1132 EXE_FILES = @{$self->{EXE_FILES}}
1139 $line = ''; #avoid unitialized var warning
1141 if (length($line) + length($to) > 80) {
1142 push @m, "\t\$(RM_F) $line\n";
1145 else { $line .= " $to"; }
1147 push @m, "\t\$(RM_F) $line\n\n";
1149 while (($from,$to) = each %fromto) {
1151 if ($to =~ m#[/>:\]]#) { $todir = dirname($to); }
1152 else { ($todir = $to) =~ s/[^\)]+$//; }
1153 $todir = $self->fixpath($todir,1);
1155 $to : $from \$(MAKEFILE) ${todir}.exists
1158 ", $self->dir_target($todir);
1164 # --- Sub-directory Sections ---
1167 my($self, $subdir) = @_;
1169 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1170 $self = $ExtUtils::MakeMaker::Parent[-1];
1173 $subdir = $self->fixpath($subdir,1);
1177 olddef = F$Environment("Default")
1178 Set Default ',$subdir,'
1179 - $(MMS) all $(USEMACROS)$(PASTHRU)$(MACROEND)
1180 Set Default \'olddef\'
1186 # --- Cleanup and Distribution Sections ---
1189 my($self, %attribs) = @_;
1191 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1192 $self = $ExtUtils::MakeMaker::Parent[-1];
1196 # Delete temporary files but do not touch installed files. We don\'t delete
1197 # the Descrip.MMS here so that a later make realclean still has it to use.
1200 foreach $dir (@{$self->{DIR}}) { # clean subdirectories first
1201 my($vmsdir) = $self->fixpath($dir,1);
1202 push( @m, ' If F$Search("'.$vmsdir.'$(MAKEFILE)") Then \\',"\n\t",
1203 '$(PERL) -e "chdir ',"'$vmsdir'",'; print `$(MMS) clean`;"',"\n");
1205 push @m, ' $(RM_F) *.Map *.lis *.cpp *$(OBJ_EXT) *$(LIB_EXT) *.Opt $(BOOTSTRAP) $(BASEEXT).bso
1208 my(@otherfiles) = values %{$self->{XS}}; # .c files from *.xs files
1209 push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
1210 push(@otherfiles, 'blib.dir', '$(MAKE_APERL_FILE)', 'extralibs.ld', 'perlmain.c');
1211 push(@otherfiles,$self->catfile('$(INST_ARCHAUTODIR)','extralibs.all'));
1213 $line = ''; #avoid unitialized var warning
1214 foreach $file (@otherfiles) {
1215 $file = $self->fixpath($file);
1216 if (length($line) + length($file) > 80) {
1217 push @m, "\t\$(RM_RF) $line\n";
1220 else { $line .= " $file"; }
1222 push @m, "\t\$(RM_RF) $line\n\n";
1223 push(@m, " $attribs{POSTOP}\n") if $attribs{POSTOP};
1229 my($self, %attribs) = @_;
1231 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1232 $self = $ExtUtils::MakeMaker::Parent[-1];
1236 # Delete temporary files (via clean) and also delete installed files
1239 foreach(@{$self->{DIR}}){
1240 my($vmsdir) = $self->fixpath($_,1);
1241 push(@m, ' If F$Search("'."$vmsdir".'$(MAKEFILE)").nes."" Then \\',"\n\t",
1242 '$(PERL) -e "chdir ',"'$vmsdir'",'; print `$(MMS) realclean`;"',"\n");
1244 push @m,' $(RM_RF) $(INST_AUTODIR) $(INST_ARCHAUTODIR)
1246 # We can't expand several of the MMS macros here, since they don't have
1247 # corresponding %$self keys (i.e. they're defined in Descrip.MMS as a
1248 # combination of macros). In order to stay below DCL's 255 char limit,
1249 # we put only 2 on a line.
1250 my($file,$line,$fcnt);
1251 my(@files) = qw{ *.Opt $(INST_DYNAMIC) $(INST_STATIC) $(INST_BOOT) $(INST_PM) $(OBJECT) $(MAKEFILE) $(MAKEFILE)_old };
1252 $line = ''; #avoid unitialized var warning
1253 foreach $file (@files) {
1254 $file = $self->fixpath($file);
1255 if (length($line) + length($file) > 80 || ++$fcnt >= 2) {
1256 push @m, "\t\$(RM_F) $line\n";
1260 else { $line .= " $file"; }
1262 push @m, "\t\$(RM_F) $line\n";
1263 if ($attribs{FILES} && ref $attribs{FILES} eq 'ARRAY') {
1265 foreach $file (@{$attribs{'FILES'}}) {
1266 $file = $self->fixpath($file);
1267 if (length($line) + length($file) > 80) {
1268 push @m, "\t\$(RM_RF) $line\n";
1271 else { $line .= " $file"; }
1273 push @m, "\t\$(RM_RF) $line\n";
1275 push(@m, " $attribs{POSTOP}\n") if $attribs{POSTOP};
1283 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1284 $self = $ExtUtils::MakeMaker::Parent[-1];
1287 distclean :: realclean distcheck
1291 $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Manifest \'&fullcheck\'; fullcheck()"
1294 $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Manifest \'&fullcheck\'; skipcheck()"
1297 $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Manifest \'&mkmanifest\'; mkmanifest()"
1305 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1306 $self = $ExtUtils::MakeMaker::Parent[-1];
1309 dist : $(DIST_DEFAULT)
1312 zipdist : $(DISTVNAME).zip$(SUFFIX)
1315 $(DISTVNAME).zip$(SUFFIX) : distdir
1317 $(ZIP) "$(ZIPFLAGS)" $(MMS$TARGET) $(SRC)
1318 $(RM_RF) $(DISTVNAME)
1323 $(SHARE) $(SRC) $(DISTVNAME).share$(SUFFIX)
1324 $(RM_RF) $(DISTVNAME)
1333 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1334 $self = $ExtUtils::MakeMaker::Parent[-1];
1338 $(RM_RF) $(DISTVNAME)
1339 $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Manifest '/mani/';" \\
1340 -e "manicopy(maniread(),'$(DISTVNAME)','$(DIST_CP)');"
1348 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1349 $self = $ExtUtils::MakeMaker::Parent[-1];
1353 startdir = F$Environment("Default")
1354 Set Default [.$(DISTVNAME)]
1355 $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" Makefile.PL
1358 Set Default 'startdir'
1365 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1366 $self = $ExtUtils::MakeMaker::Parent[-1];
1372 # --- Test and Installation Sections ---
1377 my($self, %attribs) = @_;
1379 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1380 $self = $ExtUtils::MakeMaker::Parent[-1];
1384 if ($self->{EXE_FILES}) {
1385 my($line,$file) = ('','');
1386 foreach $file (@{$self->{EXE_FILES}}) {
1388 if (length($line) > 128) {
1389 push(@docfiles,qq[\t\$(PERL) -e "print $line" >>.MM_tmp\n]);
1393 push(@docfiles,qq[\t\$(PERL) -e "print $line" >>.MM_tmp\n]) if $line;
1397 install :: all pure_install doc_install
1400 install_perl :: all pure_perl_install doc_perl_install
1403 install_site :: all pure_site_install doc_site_install
1406 install_ :: install_site
1407 ],$self->{NOECHO},q[Write Sys$Output "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"
1409 pure_install :: pure_$(INSTALLDIRS)_install
1412 doc_install :: doc_$(INSTALLDIRS)_install
1413 ],$self->{NOECHO},q[Write Sys$Output "Appending installation info to $(INST_ARCHLIB)perllocal.pod"
1415 pure__install : pure_site_install
1416 ],$self->{NOECHO},q[Write Sys$Output "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"
1418 doc__install : doc_site_install
1419 ],$self->{NOECHO},q[Write Sys$Output "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"
1421 # This hack brought to you by DCL's 255-character command line limit
1422 pure_perl_install ::
1423 ].$self->{NOECHO}.q[$(PERL) -e "print 'read ].$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q[ '" >.MM_tmp
1424 ].$self->{NOECHO}.q[$(PERL) -e "print 'write ].$self->catfile('$(INSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q[ '" >>.MM_tmp
1425 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_LIB) $(INSTALLPRIVLIB) '" >>.MM_tmp
1426 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_ARCHLIB) $(INSTALLARCHLIB) '" >>.MM_tmp
1427 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_EXE) $(INSTALLBIN) '" >>.MM_tmp
1428 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_MAN1DIR) $(INSTALLMAN1DIR) '" >>.MM_tmp
1429 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_MAN3DIR) $(INSTALLMAN3DIR) '" >>.MM_tmp
1430 $(MOD_INSTALL) <.MM_tmp
1431 ].$self->{NOECHO}.q[Delete/NoLog/NoConfirm .MM_tmp;
1432 ].$self->{NOECHO}.q[$(WARN_IF_OLD_PACKLIST) ].$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q[
1435 pure_site_install ::
1436 ].$self->{NOECHO}.q[$(PERL) -e "print 'read ].$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q[ '" >.MM_tmp
1437 ].$self->{NOECHO}.q[$(PERL) -e "print 'write ].$self->catfile('$(INSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q[ '" >>.MM_tmp
1438 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_LIB) $(INSTALLSITELIB) '" >>.MM_tmp
1439 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_ARCHLIB) $(INSTALLSITEARCH) '" >>.MM_tmp
1440 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_EXE) $(INSTALLBIN) '" >>.MM_tmp
1441 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_MAN1DIR) $(INSTALLMAN1DIR) '" >>.MM_tmp
1442 ].$self->{NOECHO}.q[$(PERL) -e "print '$(INST_MAN3DIR) $(INSTALLMAN3DIR) '" >>.MM_tmp
1443 $(MOD_INSTALL) <.MM_tmp
1444 ].$self->{NOECHO}.q[Delete/NoLog/NoConfirm .MM_tmp;
1445 ].$self->{NOECHO}.q[$(WARN_IF_OLD_PACKLIST) ].$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q[
1449 ].$self->{NOECHO}.q[$(PERL) -e "print 'Module $(NAME)|installed into|$(INSTALLPRIVLIB)|'" >.MM_tmp
1450 ].$self->{NOECHO}.q[$(PERL) -e "print 'LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|'" >>.MM_tmp
1451 ].$self->{NOECHO}.q[$(PERL) -e "print 'LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|'" >>.MM_tmp
1452 ],@docfiles,q[ $(DOC_INSTALL) <.MM_tmp >>].$self->catfile('$(INSTALLARCHLIB)','perllocal.pod').q[
1453 ].$self->{NOECHO}.q[Delete/NoLog/NoConfirm .MM_tmp;
1457 ].$self->{NOECHO}.q[$(PERL) -e "print 'Module $(NAME)|installed into|$(INSTALLSITELIB)|'" >.MM_tmp
1458 ].$self->{NOECHO}.q[$(PERL) -e "print 'LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|'" >>.MM_tmp
1459 ].$self->{NOECHO}.q[$(PERL) -e "print 'LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|'" >>.MM_tmp
1460 ],@docfiles,q[ $(DOC_INSTALL) <.MM_tmp >>].$self->catfile('$(INSTALLARCHLIB)','perllocal.pod').q[
1461 ].$self->{NOECHO}.q[Delete/NoLog/NoConfirm .MM_tmp;
1466 uninstall :: uninstall_from_$(INSTALLDIRS)dirs
1469 uninstall_from_perldirs ::
1470 ].$self->{NOECHO}.q[$(UNINSTALL) ].$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q[
1472 uninstall_from_sitedirs ::
1473 ].$self->{NOECHO}.q[$(UNINSTALL) ].$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist')."\n";
1482 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1483 $self = $ExtUtils::MakeMaker::Parent[-1];
1488 $(OBJECT) : $(PERL_INC)EXTERN.h, $(PERL_INC)INTERN.h, $(PERL_INC)XSUB.h, $(PERL_INC)av.h
1489 $(OBJECT) : $(PERL_INC)cop.h, $(PERL_INC)cv.h, $(PERL_INC)embed.h, $(PERL_INC)form.h
1490 $(OBJECT) : $(PERL_INC)gv.h, $(PERL_INC)handy.h, $(PERL_INC)hv.h, $(PERL_INC)keywords.h
1491 $(OBJECT) : $(PERL_INC)mg.h, $(PERL_INC)op.h, $(PERL_INC)opcode.h, $(PERL_INC)patchlevel.h
1492 $(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perly.h, $(PERL_INC)pp.h, $(PERL_INC)proto.h
1493 $(OBJECT) : $(PERL_INC)regcomp.h, $(PERL_INC)regexp.h, $(PERL_INC)scope.h, $(PERL_INC)sv.h
1494 $(OBJECT) : $(PERL_INC)vmsish.h, $(PERL_INC)util.h, $(PERL_INC)config.h
1496 ' if $self->{OBJECT};
1499 # Check for unpropagated config.sh changes. Should never happen.
1500 # We do NOT just update config.h because that is not sufficient.
1501 # An out of date config.h is not fatal but complains loudly!
1502 #$(PERL_INC)config.h : $(PERL_SRC)config.sh
1503 $(PERL_INC)config.h : $(PERL_VMS)config.vms
1504 ',$self->{NOECHO},'Write Sys$Error "Warning: $(PERL_INC)config.h out of date with $(PERL_VMS)config.vms"
1506 #$(PERL_ARCHLIB)Config.pm : $(PERL_SRC)config.sh
1507 $(PERL_ARCHLIB)Config.pm : $(PERL_VMS)config.vms $(PERL_VMS)genconfig.pl
1508 ',$self->{NOECHO},'Write Sys$Error "$(PERL_ARCHLIB)Config.pm may be out of date with config.vms or genconfig.pl"
1509 olddef = F$Environment("Default")
1510 Set Default $(PERL_SRC)
1511 $(MMS) $(USEMAKEFILE)[.VMS]$(MAKEFILE) [.lib.',$Config{'arch'},']config.pm
1512 Set Default \'olddef\'
1513 ') if $self->{PERL_SRC};
1515 push(@m, join(" ", map($self->fixpath($_),values %{$self->{XS}}))." : \$(XSUBPPDEPS)\n")
1524 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1525 $self = $ExtUtils::MakeMaker::Parent[-1];
1528 # We do not know what target was originally specified so we
1529 # must force a manual rerun to be sure. But as it should only
1530 # happen very rarely it is not a significant problem.
1532 $(OBJECT) : $(FIRST_MAKEFILE)
1533 ' if $self->{OBJECT};
1536 # We take a very conservative approach here, but it\'s worth it.
1537 # We move $(MAKEFILE) to $(MAKEFILE)_old here to avoid gnu make looping.
1538 $(MAKEFILE) : Makefile.PL $(CONFIGDEP)
1539 ',$self->{NOECHO},'Write Sys$Output "$(MAKEFILE) out-of-date with respect to $(MMS$SOURCE_LIST)"
1540 ',$self->{NOECHO},'Write Sys$Output "Cleaning current config before rebuilding $(MAKEFILE) ..."
1541 - $(MV) $(MAKEFILE) $(MAKEFILE)_old
1542 - $(MMS) $(USEMAKEFILE)$(MAKEFILE)_old clean
1543 $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" Makefile.PL ',join(' ',map(qq["$_"],@ARGV)),'
1544 ',$self->{NOECHO},'Write Sys$Output "$(MAKEFILE) has been rebuilt."
1545 ',$self->{NOECHO},'Write Sys$Output "Please run $(MMS) to build the extension."
1553 my($self, %attribs) = @_;
1555 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1556 $self = $ExtUtils::MakeMaker::Parent[-1];
1558 my($tests) = $attribs{TESTS} || ( -d 't' ? 't/*.t' : '');
1562 TEST_TYPE=test_\$(LINKTYPE)
1564 test : \$(TEST_TYPE)
1567 foreach(@{$self->{DIR}}){
1568 my($vmsdir) = $self->fixpath($_,1);
1569 push(@m, ' If F$Search("',$vmsdir,'$(MAKEFILE)").nes."" Then $(PERL) -e "chdir ',"'$vmsdir'",
1570 '; print `$(MMS) $(PASTHRU2) test`'."\n");
1572 push(@m, "\t$self->{NOECHO}Write Sys\$Output \"No tests defined for \$(NAME) extension.\"\n")
1573 unless $tests or -f "test.pl" or @{$self->{DIR}};
1576 push(@m, "test_dynamic :: all\n");
1577 push(@m, $self->test_via_harness('$(FULLPERL)', $tests)) if $tests;
1578 push(@m, $self->test_via_script('$(FULLPERL)', 'test.pl')) if -f "test.pl";
1579 push(@m, " \$(NOOP)\n") if (!$tests && ! -f "test.pl");
1582 # Occasionally we may face this degenerate target:
1583 push @m, "test_ : test_dynamic\n\n";
1585 if ($self->needs_linking()) {
1586 push(@m, "test_static :: all \$(MAP_TARGET)\n");
1587 push(@m, $self->test_via_harness('$(MAP_TARGET)', $tests)) if $tests;
1588 push(@m, $self->test_via_script('$(MAP_TARGET)', 'test.pl')) if -f "test.pl";
1589 push(@m, "\t$self->{NOECHO}\$(NOOP)\n") if (!$tests && ! -f "test.pl");
1593 push @m, "test_static :: test_dynamic\n\t$self->{NOECHO}\$(NOOP)\n";
1600 sub test_via_harness {
1601 my($self,$perl,$tests) = @_;
1603 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1604 $self = $ExtUtils::MakeMaker::Parent[-1];
1606 " $perl".' "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)" \\'."\n\t".
1607 '-e "use Test::Harness qw(&runtests $verbose); $verbose=$(TEST_VERBOSE); runtests @ARGV;" \\'."\n\t$tests\n";
1611 sub test_via_script {
1612 my($self,$perl,$script) = @_;
1614 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1615 $self = $ExtUtils::MakeMaker::Parent[-1];
1617 " $perl".' "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" '.$script.'
1623 my($self, %attribs) = @_;
1625 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1626 $self = $ExtUtils::MakeMaker::Parent[-1];
1628 my($makefilename, $searchdirs, $static, $extra, $perlinc, $target, $tmp, $libperl) =
1629 @attribs{qw(MAKE DIRS STAT EXTRA INCL TARGET TMP LIBPERL)};
1632 # --- MakeMaker makeaperl section ---
1633 MAP_TARGET = $target
1635 return join '', @m if $self->{PARENT};
1637 my($dir) = join ":", @{$self->{DIR}};
1639 unless ($self->{MAKEAPERL}) {
1641 $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
1642 },$self->{NOECHO},q{Write Sys$Output "Writing ""$(MMS$TARGET)"" for this $(MAP_TARGET)"
1643 },$self->{NOECHO},q{$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" \
1644 Makefile.PL DIR=}, $dir, q{ \
1645 MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
1646 MAKEAPERL=1 NORECURS=1
1648 $(MAP_TARGET) :: $(MAKE_APERL_FILE)
1649 $(MMS)$(USEMAKEFILE)$(MAKE_APERL_FILE) static $(MMS$TARGET)
1651 push @m, map( " \\\n\t\t$_", @ARGV );
1658 my($linkcmd,@staticopts,@staticpkgs,$extralist,$target,$targdir,$libperldir);
1660 # The front matter of the linkcommand...
1661 $linkcmd = join ' ', $Config{'ld'},
1662 grep($_, @Config{qw(large split ldflags ccdlflags)});
1663 $linkcmd =~ s/\s+/ /g;
1665 # Which *.olb files could we make use of...
1667 $olbs{$self->{INST_ARCHAUTODIR}} = "$self->{BASEEXT}\$(LIB_EXT)";
1668 File::Find::find(sub {
1669 return unless m/\Q$self->{LIB_EXT}\E$/;
1670 return if m/^libperl/;
1671 $olbs{$ENV{DEFAULT}} = $_;
1672 }, grep( -d $_, @{$searchdirs || []}));
1674 # We trust that what has been handed in as argument will be buildable
1675 $static = [] unless $static;
1676 @olbs{@{$static}} = (1) x @{$static};
1678 $extra = [] unless $extra && ref $extra eq 'ARRAY';
1679 # Sort the object libraries in inverse order of
1680 # filespec length to try to insure that dependent extensions
1681 # will appear before their parents, so the linker will
1682 # search the parent library to resolve references.
1683 # (e.g. Intuit::DWIM will precede Intuit, so unresolved
1684 # references from [.intuit.dwim]dwim.obj can be found
1685 # in [.intuit]intuit.olb).
1686 for (sort keys %olbs) {
1687 next unless $olbs{$_} =~ /\Q$self->{LIB_EXT}\E$/;
1688 my($dir) = $self->fixpath($_,1);
1689 my($extralibs) = $dir . "extralibs.ld";
1690 my($extopt) = $dir . $olbs{$_};
1691 $extopt =~ s/$self->{LIB_EXT}$/.opt/;
1692 if (-f $extralibs ) {
1693 open LIST,$extralibs or warn $!,next;
1694 push @$extra, <LIST>;
1698 open OPT,$extopt or die $!;
1700 next unless /(?:UNIVERSAL|VECTOR)=boot_([\w_]+)/;
1701 # ExtUtils::Miniperl expects Unix paths
1702 (my($pkg) = "$1_$1$self->{LIB_EXT}") =~ s#_*#/#g;
1703 push @staticpkgs,$pkg;
1705 push @staticopts, $extopt;
1709 $target = "Perl.Exe" unless $target;
1710 ($shrtarget,$targdir) = fileparse($target);
1711 $shrtarget =~ s/^([^.]*)/$1Shr/;
1712 $shrtarget = $targdir . $shrtarget;
1713 $target = "Perlshr.$Config{'dlext'}" unless $target;
1714 $tmp = "[]" unless $tmp;
1715 $tmp = $self->fixpath($tmp,1);
1717 $extralist = join(' ',@$extra);
1718 $extralist =~ s/[,\s\n]+/, /g;
1720 else { $extralist = ''; }
1722 unless (-f $libperl || -f ($libperl = $self->catfile($Config{'installarchlib'},'CORE',$libperl))) {
1723 print STDOUT "Warning: $libperl not found\n";
1728 if (defined $self->{PERL_SRC}) {
1729 $libperl = $self->catfile($self->{PERL_SRC},"libperl$self->{LIB_EXT}");
1730 } elsif (-f ($libperl = $self->catfile($Config{'installarchlib'},'CORE',"libperl$self->{LIB_EXT}")) ) {
1732 print STDOUT "Warning: $libperl not found
1733 If you're going to build a static perl binary, make sure perl is installed
1734 otherwise ignore this warning\n";
1737 $libperldir = $self->fixpath((fileparse($libperl))[1],1);
1740 # Fill in the target you want to produce if it\'s not perl
1741 MAP_TARGET = ',$self->fixpath($target),'
1742 MAP_SHRTARGET = ',$self->fixpath($shrtarget),"
1743 MAP_LINKCMD = $linkcmd
1744 MAP_PERLINC = ", $perlinc ? map('"$_" ',@{$perlinc}) : '','
1745 # We use the linker options files created with each extension, rather than
1746 #specifying the object files directly on the command line.
1747 MAP_STATIC = ',@staticopts ? join(' ', @staticopts) : '','
1748 MAP_OPTS = ',@staticopts ? ','.join(',', map($_.'/Option', @staticopts)) : '',"
1749 MAP_EXTRA = $extralist
1750 MAP_LIBPERL = ",$self->fixpath($libperl),'
1755 $(MAP_SHRTARGET) : $(MAP_LIBPERL) $(MAP_STATIC) ',"${libperldir}Perlshr_Attr.Opt",'
1756 $(MAP_LINKCMD)/Shareable=$(MMS$TARGET) $(MAP_OPTS), $(MAP_EXTRA), $(MAP_LIBPERL) ',"${libperldir}Perlshr_Attr.Opt",'
1757 $(MAP_TARGET) : $(MAP_SHRTARGET) ',"${tmp}perlmain\$(OBJ_EXT) ${tmp}PerlShr.Opt",'
1758 $(MAP_LINKCMD) ',"${tmp}perlmain\$(OBJ_EXT)",', PerlShr.Opt/Option
1759 ',$self->{NOECHO},'Write Sys$Output "To install the new ""$(MAP_TARGET)"" binary, say"
1760 ',$self->{NOECHO},'Write Sys$Output " $(MMS)$(USEMAKEFILE)$(MAKEFILE) inst_perl $(USEMACROS)MAP_TARGET=$(MAP_TARGET)$(ENDMACRO)"
1761 ',$self->{NOECHO},'Write Sys$Output "To remove the intermediate files, say
1762 ',$self->{NOECHO},'Write Sys$Output " $(MMS)$(USEMAKEFILE)$(MAKEFILE) map_clean"
1765 ',"${tmp}perlmain.c",' : $(MAKEFILE)
1766 ',$self->{NOECHO},'$(PERL) $(MAP_PERLINC) -e "use ExtUtils::Miniperl; writemain(qw|',@staticpkgs,'|)" >$(MMS$TARGET)
1770 # More from the 255-char line length limit
1772 ].$self->{NOECHO}.q[$(PERL) -e "print 'Perl binary $(MAP_TARGET)|'" >.MM_tmp
1773 ].$self->{NOECHO}.q[$(PERL) -e "print 'MAP_STATIC|$(MAP_STATIC)|'" >>.MM_tmp
1774 ].$self->{NOECHO}.q[$(PERL) -pl040 -e " " ].$self->catfile('$(INST_ARCHAUTODIR)','extralibs.all'),q[ >>.MM_tmp
1775 ].$self->{NOECHO}.q[$(PERL) -e "print 'MAP_LIBPERL|$(MAP_LIBPERL)|'" >>.MM_tmp
1776 $(DOC_INSTALL) <.MM_tmp >>].$self->catfile('$(INSTALLARCHLIB)','perllocal.pod').q[
1777 ].$self->{NOECHO}.q[Delete/NoLog/NoConfirm .MM_tmp;
1781 inst_perl : pure_inst_perl doc_inst_perl
1784 pure_inst_perl : \$(MAP_TARGET)
1785 $self->{CP} \$(MAP_SHRTARGET) ",$self->fixpath($Config{'installbin'},1),"
1786 $self->{CP} \$(MAP_TARGET) ",$self->fixpath($Config{'installbin'},1),"
1792 \$(RM_F) ${tmp}perlmain\$(OBJ_EXT) ${tmp}perlmain.c \$(MAKEFILE)
1793 \$(RM_F) ${tmp}PerlShr.Opt \$(MAP_TARGET)
1802 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1803 $self = $ExtUtils::MakeMaker::Parent[-1];
1809 # --- Make-Directories section (internal method) ---
1810 # dir_target(@array) returns a Makefile entry for the file .exists in each
1811 # named directory. Returns nothing, if the entry has already been processed.
1812 # We're helpless though, if the same directory comes as $(FOO) _and_ as "bar".
1813 # Both of them get an entry, that's why we use "::". I chose
1814 # '$(PERL_INC)perl.h' as the prerequisite, because there has to be one,
1815 # something that doesn't change too often :)
1818 my($self,@dirs) = @_;
1820 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1821 $self = $ExtUtils::MakeMaker::Parent[-1];
1824 foreach $dir (@dirs) {
1825 next if $self->{DIR_TARGET}{$self}{$dir}++;
1826 my($vmsdir) = $self->fixpath($dir,1);
1828 ${vmsdir}.exists :: \$(PERL_INC)perl.h
1829 $self->{NOECHO}\$(MKPATH) $vmsdir
1830 $self->{NOECHO}\$(EQUALIZE_TIMESTAMP) \$(MMS\$SOURCE) \$(MMS\$TARGET)
1837 # --- Output postprocessing section ---
1840 # Insure that colons marking targets are preceded by space -
1841 # most Unix Makes don't need this, but it's necessary under VMS
1842 # to distinguish the target delimiter from a colon appearing as
1843 # part of a filespec.
1845 my($self,$text) = @_;
1847 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
1848 $self = $ExtUtils::MakeMaker::Parent[-1];
1850 $text =~ s/([^\s:])(:+\s)/$1 $2/gs;
1860 ExtUtils::MM_VMS - methods to override UN*X behaviour in ExtUtils::MakeMaker
1864 use ExtUtils::MM_VMS; # Done internally by ExtUtils::MakeMaker if needed
1868 See ExtUtils::MM_Unix for a documentation of the methods provided
1869 there. This package overrides the implementation of these methods, not