2 # MakeMaker default methods for MacOS
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 MacOS.
6 # Author: Matthias Neeracher <neeracher@mac.com>
8 package ExtUtils::MM_MacOS;
9 require ExtUtils::MM_Any;
10 require ExtUtils::MM_Unix;
11 @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
13 use vars qw($VERSION);
22 use vars qw(%make_data);
24 use ExtUtils::MakeMaker qw($Verbose &neatvalue);
28 ExtUtils::MM_MacOS - methods to override UN*X behaviour in ExtUtils::MakeMaker
32 use ExtUtils::MM_MacOS; # Done internally by ExtUtils::MakeMaker if needed
36 MM_MacOS currently only produces an approximation to the correct Makefile.
41 my($class,$self) = @_;
45 print STDOUT "Mac MakeMaker (v$ExtUtils::MakeMaker::VERSION)\n" if $Verbose;
46 if (-f "MANIFEST" && ! -f "Makefile.mk"){
47 ExtUtils::MakeMaker::check_manifest();
50 mkdir("Obj", 0777) unless -d "Obj";
52 $self = {} unless (defined $self);
54 my(%initial_att) = %$self; # record initial attributes
56 if (defined $self->{CONFIGURE}) {
57 if (ref $self->{CONFIGURE} eq 'CODE') {
58 $self = { %$self, %{&{$self->{CONFIGURE}}}};
60 Carp::croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n";
64 $class = ++$ExtUtils::MakeMaker::PACKNAME;
66 print "Blessing Object into class [$class]\n" if $Verbose>=2;
67 ExtUtils::MakeMaker::mv_all_methods("MY",$class);
70 @{"$class\:\:ISA"} = 'MM';
73 if (defined $Parent[-2]){
74 $self->{PARENT} = $Parent[-2];
76 for $key (keys %Prepend_dot_dot) {
77 next unless defined $self->{PARENT}{$key};
78 $self->{$key} = $self->{PARENT}{$key};
79 $self->{$key} = File::Spec->catdir("::",$self->{$key})
80 unless File::Spec->file_name_is_absolute($self->{$key});
82 $self->{PARENT}->{CHILDREN}->{$class} = $self if $self->{PARENT};
84 $self->parse_args(@ARGV);
87 $self->{NAME} ||= $self->guess_name;
89 ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
92 $self->init_dirscan();
95 push @{$self->{RESULT}}, <<END;
96 # This Makefile is for the $self->{NAME} extension to perl.
98 # It was generated automatically by MakeMaker version
99 # $VERSION (Revision: $Revision) from the contents of
100 # Makefile.PL. Don't edit this file, edit Makefile.PL instead.
102 # ANY CHANGES MADE HERE WILL BE LOST!
104 # MakeMaker Parameters:
107 foreach $key (sort keys %initial_att){
108 my($v) = neatvalue($initial_att{$key});
109 $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
111 push @{$self->{RESULT}}, "# $key => $v";
114 # turn the SKIP array into a SKIPHASH hash
116 for $skip (@{$self->{SKIP} || []}) {
117 $self->{SKIPHASH}{$skip} = 1;
119 delete $self->{SKIP}; # free memory
121 # We skip many sections for MacOS, but we don't say anything about it in the Makefile
122 for (qw/post_initialize const_config tool_autosplit
123 tool_xsubpp tools_other dist macro depend post_constants
124 pasthru c_o xs_c xs_o top_targets linkext
125 dynamic_bs dynamic_lib static_lib manifypods
126 installbin subdirs dist_basics dist_core
127 dist_dir dist_test dist_ci install force perldepend makefile
128 staticmake test pm_to_blib selfdocument cflags
129 const_loadlibs const_cccmd
132 $self->{SKIPHASH}{$_} = 2;
134 push @ExtUtils::MakeMaker::MM_Sections, "rulez"
135 unless grep /rulez/, @ExtUtils::MakeMaker::MM_Sections;
137 if ($self->{PARENT}) {
138 for (qw/install dist dist_basics dist_core dist_dir dist_test dist_ci/) {
139 $self->{SKIPHASH}{$_} = 1;
143 # We run all the subdirectories now. They don't have much to query
144 # from the parent, but the parent has to query them: if they need linking!
145 unless ($self->{NORECURS}) {
146 $self->eval_in_subdirs if @{$self->{DIR}};
150 foreach $section ( @ExtUtils::MakeMaker::MM_Sections ){
151 next if ($self->{SKIPHASH}{$section} == 2);
152 print "Processing Makefile '$section' section\n" if ($Verbose >= 2);
153 $self->{ABSTRACT_FROM} = macify($self->{ABSTRACT_FROM})
154 if $self->{ABSTRACT_FROM};
155 my($skipit) = $self->skipcheck($section);
157 push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit.";
159 my(%a) = %{$self->{$section} || {}};
160 push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
161 push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
162 push @{$self->{RESULT}}, $self->nicetext($self->$section( %a ));
166 push @{$self->{RESULT}}, "\n# End.";
169 $ExtUtils::MM_MacOS::make_data{$cwd} = $self;
176 return 'skipped' if $self->{SKIPHASH}{$section};
182 Returns true, if the argument is likely to be a command.
187 my($self,$file) = @_;
188 return $file if ! -d $file;
194 Guess the name of this package by examining the working directory's
195 name. MakeMaker calls this only if the developer has not supplied a
203 $name =~ s/.*:// unless ($name =~ s/^.*:ext://);
205 $name =~ s#[\-_][\d.\-]+$##; # this is new with MM 5.00
211 Translate relative path names into Mac names.
216 # mmm, better ... and this condition should always be satisified,
217 # as the module is now distributed with MacPerl, but leave in anyway
218 if (do 'Mac/FileSpec/Unixish.pm') {
219 return Mac::FileSpec::Unixish::nativize($_[0]);
227 foreach (split(/[ \t\n]+/, $unix)) {
240 Translate to Mac names & patterns
248 foreach (split(/[ \t\n]+/, $unix)) {
253 $_ = "'$_'" if /[?Å]/;
263 Initializes some of NAME, FULLEXT, BASEEXT, ROOTEXT, DLBASE, PERL_SRC,
264 PERL_LIB, PERL_ARCHLIB, PERL_INC, INSTALLDIRS, INST_*, INSTALL*,
265 PREFIX, CONFIG, AR, AR_STATIC_ARGS, LD, OBJ_EXT, LIB_EXT, MAP_TARGET,
266 LIBPERL_A, VERSION_FROM, VERSION, DISTNAME, VERSION_SYM.
273 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
274 $self = $ExtUtils::MakeMaker::Parent[-1];
277 # --- Initialize Module Name and Paths
279 # NAME = The perl module name for this extension (eg DBD::Oracle).
280 # FULLEXT = Pathname for extension directory (eg DBD/Oracle).
281 # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
282 # ROOTEXT = Directory part of FULLEXT with trailing :.
284 $self->{NAME}) =~ s!::!:!g ; #eg. BSD:Foo:Socket
286 $self->{NAME}) =~ s!.*::!! ; #eg. Socket
288 $self->{FULLEXT}) =~ s#:?\Q$self->{BASEEXT}\E$## ; #eg. BSD:Foo
289 $self->{ROOTEXT} .= ":" if ($self->{ROOTEXT});
291 # --- Initialize PERL_LIB, INST_LIB, PERL_SRC
293 # *Real* information: where did we get these two from? ...
294 my $inc_config_dir = dirname($INC{'Config.pm'});
295 my $inc_carp_dir = dirname($INC{'Carp.pm'});
297 unless ($self->{PERL_SRC}){
299 foreach $dir (qw(:: ::: :::: ::::: ::::::)){
300 if (-f "${dir}perl.h") {
301 $self->{PERL_SRC}=$dir ;
305 if (!$self->{PERL_SRC} && -f "$ENV{MACPERL}CORE:perl:perl.h") {
306 # Mac pathnames may be very nasty, so we'll install symlinks
307 unlink(":PerlCore", ":PerlLib");
308 symlink("$ENV{MACPERL}CORE:", "PerlCore");
309 symlink("$ENV{MACPERL}lib:", "PerlLib");
310 $self->{PERL_SRC} = ":PerlCore:perl:" ;
311 $self->{PERL_LIB} = ":PerlLib:";
314 if ($self->{PERL_SRC}){
315 $self->{MACPERL_SRC} = File::Spec->catdir("$self->{PERL_SRC}","macos:");
316 $self->{MACPERL_LIB} ||= File::Spec->catdir("$self->{MACPERL_SRC}","lib");
317 $self->{PERL_LIB} ||= File::Spec->catdir("$self->{PERL_SRC}","lib");
318 $self->{PERL_ARCHLIB} = $self->{PERL_LIB};
319 $self->{PERL_INC} = $self->{PERL_SRC};
320 $self->{MACPERL_INC} = $self->{MACPERL_SRC};
323 $self->{PERL_LIB} ||= "$ENV{MACPERL}site_perl";
324 $self->{PERL_ARCHLIB} = $self->{PERL_LIB};
325 $self->{PERL_INC} = $ENV{MACPERL};
327 #On MacOS, we need to build under the Perl source directory or have the MacPerl SDK
328 #installed in the MacPerl folder.
332 $self->{INSTALLDIRS} = "perl";
333 $self->{INST_LIB} = $self->{INST_ARCHLIB} = $self->{PERL_LIB};
334 $self->{INST_MAN1DIR} = $self->{INSTALLMAN1DIR} = "none";
335 $self->{MAN1EXT} ||= $Config::Config{man1ext};
336 $self->{INST_MAN3DIR} = $self->{INSTALLMAN3DIR} = "none";
337 $self->{MAN3EXT} ||= $Config::Config{man3ext};
338 $self->{MAP_TARGET} ||= "perl";
340 # make a simple check if we find Exporter
341 # hm ... do we really care? at all?
342 # warn "Warning: PERL_LIB ($self->{PERL_LIB}) seems not to be a perl library directory
343 # (Exporter.pm not found)"
344 # unless -f File::Spec->catfile("$self->{PERL_LIB}","Exporter.pm") ||
345 # $self->{NAME} eq "ExtUtils::MakeMaker";
347 # Determine VERSION and VERSION_FROM
348 ($self->{DISTNAME}=$self->{NAME}) =~ s#(::)#-#g unless $self->{DISTNAME};
349 if ($self->{VERSION_FROM}){
351 open(FH,macify($self->{VERSION_FROM})) or
352 die "Could not open '$self->{VERSION_FROM}' (attribute VERSION_FROM): $!";
355 next unless /\$([\w:]*\bVERSION)\b.*=/;
356 local $ExtUtils::MakeMaker::module_version_variable = $1;
359 die "Could not eval '$eval': $@" if $@;
360 if ($self->{VERSION} = $ {$ExtUtils::MakeMaker::module_version_variable}){
361 print "$self->{NAME} VERSION is $self->{VERSION} (from $self->{VERSION_FROM})\n" if $Verbose;
363 # XXX this should probably croak
364 print "WARNING: Setting VERSION via file '$self->{VERSION_FROM}' failed\n";
371 if ($self->{VERSION}) {
372 $self->{VERSION} =~ s/^\s+//;
373 $self->{VERSION} =~ s/\s+$//;
376 $self->{VERSION} = "0.10" unless $self->{VERSION};
377 ($self->{VERSION_SYM} = $self->{VERSION}) =~ s/\W/_/g;
380 # Graham Barr and Paul Marquess had some ideas how to ensure
381 # version compatibility between the *.pm file and the
382 # corresponding *.xs file. The bottomline was, that we need an
383 # XS_VERSION macro that defaults to VERSION:
384 $self->{XS_VERSION} ||= $self->{VERSION};
386 # --- Initialize Perl Binary Locations
388 # Find Perl 5. The only contract here is that both 'PERL' and 'FULLPERL'
389 # will be working versions of perl 5. miniperl has priority over perl
390 # for PERL to ensure that $(PERL) is usable while building ./ext/*
391 my ($component,@defpath);
392 foreach $component ($self->{PERL_SRC}, File::Spec->path(), $Config::Config{binexp}) {
393 push @defpath, $component if defined $component;
395 $self->{PERL} = "$self->{PERL_SRC}miniperl";
396 $self->{FULLPERL} = "$self->{PERL_SRC}perl";
397 $self->{MAKEFILE} = "Makefile.mk";
402 Initializes LDLOADLIBS, LIBS
406 sub init_others { # --- Initialize Other Attributes
409 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
410 $self = $ExtUtils::MakeMaker::Parent[-1];
413 if ( !$self->{OBJECT} ) {
414 # init_dirscan should have found out, if we have C files
415 $self->{OBJECT} = "";
416 $self->{OBJECT} = "$self->{BASEEXT}.c" if @{$self->{C}||[]};
418 $self->{OBJECT} =~ s/\$\(O_FILES\)/@{$self->{C}||[]}/;
421 foreach (split(/[ \t\n]+/, $self->{OBJECT})) {
422 if (/^$self->{BASEEXT}\.o(bj)?$/) {
423 $src .= " $self->{BASEEXT}.c";
424 } elsif (/^(.*\..*)\.o$/) {
426 } elsif (/^(.*)(\.o(bj)?|\$\(OBJ_EXT\))$/) {
436 $self->{SOURCE} = $src;
442 Initializes DIR, XS, PM, C, O_FILES, H, PL_FILES, MAN*PODS, EXE_FILES.
446 sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
449 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
450 $self = $ExtUtils::MakeMaker::Parent[-1];
452 my($name, %dir, %xs, %c, %h, %ignore, %pl_files, %manifypods);
453 local(%pm); #the sub in find() has to see this hash
455 # in case we don't find it below!
456 if ($self->{VERSION_FROM}) {
457 my $version_from = macify($self->{VERSION_FROM});
458 $pm{$version_from} = File::Spec->catfile('$(INST_LIBDIR)',
462 $ignore{'test.pl'} = 1;
463 foreach $name ($self->lsdir(":")){
464 next if ($name =~ /^\./ or $ignore{$name});
465 next unless $self->libscan($name);
467 $dir{$name} = $name if (-f ":$name:Makefile.PL");
468 } elsif ($name =~ /\.xs$/){
469 my($c); ($c = $name) =~ s/\.xs$/.c/;
472 } elsif ($name =~ /\.c(p|pp|xx|c)?$/i){ # .c .C .cpp .cxx .cc .cp
474 unless $name =~ m/perlmain\.c/; # See MAP_TARGET
475 } elsif ($name =~ /\.h$/i){
477 } elsif ($name =~ /\.(p[ml]|pod)$/){
478 $pm{$name} = File::Spec->catfile('$(INST_LIBDIR)',$name);
479 } elsif ($name =~ /\.PL$/ && $name ne "Makefile.PL") {
480 ($pl_files{$name} = $name) =~ s/\.PL$// ;
484 # Some larger extensions often wish to install a number of *.pm/pl
485 # files into the library in various locations.
487 # The attribute PMLIBDIRS holds an array reference which lists
488 # subdirectories which we should search for library files to
489 # install. PMLIBDIRS defaults to [ 'lib', $self->{BASEEXT} ]. We
490 # recursively search through the named directories (skipping any
491 # which don't exist or contain Makefile.PL files).
493 # For each *.pm or *.pl file found $self->libscan() is called with
494 # the default installation path in $_[1]. The return value of
495 # libscan defines the actual installation location. The default
496 # libscan function simply returns the path. The file is skipped
497 # if libscan returns false.
499 # The default installation location passed to libscan in $_[1] is:
501 # ./*.pm => $(INST_LIBDIR)/*.pm
502 # ./xyz/... => $(INST_LIBDIR)/xyz/...
503 # ./lib/... => $(INST_LIB)/...
505 # In this way the 'lib' directory is seen as the root of the actual
506 # perl library whereas the others are relative to INST_LIBDIR
507 # (which includes ROOTEXT). This is a subtle distinction but one
508 # that's important for nested modules.
510 $self->{PMLIBDIRS} = ['lib', $self->{BASEEXT}]
511 unless $self->{PMLIBDIRS};
513 #only existing directories that aren't in $dir are allowed
515 my (@pmlibdirs) = map { macify ($_) } @{$self->{PMLIBDIRS}};
517 @{$self->{PMLIBDIRS}} = ();
518 foreach $pmlibdir (@pmlibdirs) {
519 -d $pmlibdir && !$dir{$pmlibdir} && push @{$self->{PMLIBDIRS}}, $pmlibdir;
522 if (@{$self->{PMLIBDIRS}}){
523 print "Searching PMLIBDIRS: @{$self->{PMLIBDIRS}}\n"
526 File::Find::find(sub {
528 if ($_ eq "CVS" || $_ eq "RCS"){
529 $File::Find::prune = 1;
533 my($path, $prefix) = ($File::Find::name, '$(INST_LIBDIR)');
534 my($striplibpath,$striplibname);
535 $prefix = '$(INST_LIB)' if (($striplibpath = $path) =~ s:^(\W*)lib\W:$1:);
536 ($striplibname,$striplibpath) = fileparse($striplibpath);
537 my($inst) = File::Spec->catfile($prefix,$striplibpath,$striplibname);
538 local($_) = $inst; # for backwards compatibility
539 $inst = $self->libscan($inst);
540 print "libscan($path) => '$inst'\n" if ($Verbose >= 2);
543 }, @{$self->{PMLIBDIRS}});
546 $self->{DIR} = [sort keys %dir] unless $self->{DIR};
547 $self->{XS} = \%xs unless $self->{XS};
548 $self->{PM} = \%pm unless $self->{PM};
549 $self->{C} = [sort keys %c] unless $self->{C};
550 $self->{H} = [sort keys %h] unless $self->{H};
551 $self->{PL_FILES} = \%pl_files unless $self->{PL_FILES};
553 # Set up names of manual pages to generate from pods
554 unless ($self->{MAN1PODS}) {
555 $self->{MAN1PODS} = {};
557 unless ($self->{MAN3PODS}) {
558 $self->{MAN3PODS} = {};
564 Takes a path to a file that is found by init_dirscan and returns false
565 if we don't want to include this file in the library. Mainly used to
566 exclude RCS, CVS, and SCCS directories from installation.
573 my($self,$path) = @_;
574 return '' if $path =~ m/:(RCS|CVS|SCCS):/ ;
580 Initializes lots of constants and .SUFFIXES and .PHONY
587 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
588 $self = $ExtUtils::MakeMaker::Parent[-1];
593 NAME DISTNAME NAME_SYM VERSION VERSION_SYM XS_VERSION
594 INST_LIB INST_ARCHLIB PERL_LIB PERL_SRC MACPERL_SRC MACPERL_LIB PERL FULLPERL
595 XSPROTOARG MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED SOURCE TYPEMAPS
597 next unless defined $self->{$tmp};
598 push @m, "$tmp = $self->{$tmp}\n";
602 MODULES = }.join(" \\\n\t", sort keys %{$self->{PM}})."\n";
603 push @m, "PMLIBDIRS = @{$self->{PMLIBDIRS}}\n" if @{$self->{PMLIBDIRS}};
607 .INCLUDE : $(MACPERL_SRC)BuildRules.mk
612 VERSION_MACRO = VERSION
613 DEFINE_VERSION = -d \$(VERSION_MACRO)="¶"\$(VERSION)¶""
614 XS_VERSION_MACRO = XS_VERSION
615 XS_DEFINE_VERSION = -d \$(XS_VERSION_MACRO)="¶"\$(XS_VERSION)¶""
618 $self->{DEFINE} .= " \$(XS_DEFINE_VERSION) \$(DEFINE_VERSION)";
621 MAKEMAKER = $INC{'ExtUtils/MakeMaker.pm'}
622 MM_VERSION = $ExtUtils::MakeMaker::VERSION
626 # FULLEXT = Pathname for extension directory (eg DBD:Oracle).
627 # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
628 # ROOTEXT = Directory part of FULLEXT (eg DBD)
629 # DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
632 if ($self->{DEFINE}) {
633 $self->{DEFINE} =~ s/-D/-d /g; # Preprocessor definitions may be useful
634 $self->{DEFINE} =~ s/-I\S+//g; # UN*X includes probably are not useful
637 $self->{INC} =~ s/-I\S+//g; # UN*X includes probably are not useful
640 FULLEXT BASEEXT ROOTEXT DEFINE INC
642 next unless defined $self->{$tmp};
643 push @m, "$tmp = $self->{$tmp}\n";
647 # Handy lists of source code files:
648 XS_FILES= ".join(" \\\n\t", sort keys %{$self->{XS}})."
649 C_FILES = ".join(" \\\n\t", @{$self->{C}})."
650 H_FILES = ".join(" \\\n\t", @{$self->{H}})."
655 .INCLUDE : $(MACPERL_SRC)ExtBuildRules.mk
663 Defines the static target.
668 # --- Static Loading Sections ---
672 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
673 $self = $ExtUtils::MakeMaker::Parent[-1];
675 my($extlib) = $self->{MYEXTLIB} ? "\nstatic :: myextlib\n" : "";
679 install :: do_install_static
681 install_static :: do_install_static
687 Used by MacOS to define DL_FUNCS and DL_VARS and write the *.exp
693 my($self,%attribs) = @_;
695 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
696 $self = $ExtUtils::MakeMaker::Parent[-1];
699 return '' unless !$self->{SKIPHASH}{'dynamic'};
701 my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
702 my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
706 dynamic :: $self->{BASEEXT}.exp
708 ") unless $self->{SKIPHASH}{'dynamic'};
710 my($extlib) = $self->{MYEXTLIB} ? " myextlib" : "";
713 $self->{BASEEXT}.exp: Makefile.PL$extlib
714 ", qq[\t\$(PERL) "-I\$(PERL_LIB)" -e 'use ExtUtils::Mksymlists; ],
715 'Mksymlists("NAME" => "',$self->{NAME},'", "DL_FUNCS" => ',
716 neatvalue($funcs),', "DL_VARS" => ', neatvalue($vars), ');\'
724 Defines the dynamic target.
729 # --- dynamic Loading Sections ---
733 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
734 $self = $ExtUtils::MakeMaker::Parent[-1];
739 install :: do_install_dynamic
741 install_dynamic :: do_install_dynamic
748 Defines the clean target.
753 # --- Cleanup and Distribution Sections ---
755 my($self, %attribs) = @_;
757 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
758 $self = $ExtUtils::MakeMaker::Parent[-1];
762 # Delete temporary files but do not touch installed files. We don\'t delete
763 # the Makefile here so a later make realclean still has a makefile to use.
767 # clean subdirectories first
768 for $dir (@{$self->{DIR}}) {
770 " Set OldEcho \{Echo\}
773 If \"\`Exists -f $self->{MAKEFILE}\`\" != \"\"
780 my(@otherfiles) = values %{$self->{XS}}; # .c files from *.xs files
781 push(@otherfiles, patternify($attribs{FILES})) if $attribs{FILES};
782 push @m, "\t\$(RM_RF) @otherfiles\n";
783 # See realclean and ext/utils/make_ext for usage of Makefile.old
785 "\t\$(MV) $self->{MAKEFILE} $self->{MAKEFILE}.old\n");
787 "\t$attribs{POSTOP}\n") if $attribs{POSTOP};
793 Defines the realclean target.
798 my($self, %attribs) = @_;
800 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
801 $self = $ExtUtils::MakeMaker::Parent[-1];
805 # Delete temporary files (via clean) and also delete installed files
806 realclean purge :: clean
808 # realclean subdirectories first (already cleaned)
810 " Set OldEcho \{Echo\}
813 If \"\`Exists -f %s\`\" != \"\"
818 foreach(@{$self->{DIR}}){
819 push(@m, sprintf($sub,$_,"$self->{MAKEFILE}.old","-f $self->{MAKEFILE}.old"));
820 push(@m, sprintf($sub,$_,"$self->{MAKEFILE}",''));
822 my(@otherfiles) = ($self->{MAKEFILE},
823 "$self->{MAKEFILE}.old"); # Makefiles last
824 push(@otherfiles, patternify($attribs{FILES})) if $attribs{FILES};
825 push(@m, "\t\$(RM_RF) @otherfiles\n") if @otherfiles;
826 push(@m, "\t$attribs{POSTOP}\n") if $attribs{POSTOP};
837 ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]);
838 $self = $ExtUtils::MakeMaker::Parent[-1];
841 install install_static install_dynamic ::
842 \t\$(MACPERL_SRC)PerlInstall -l \$(PERL_LIB)
844 .INCLUDE : \$(MACPERL_SRC)BulkBuildRules.mk
850 return $ExtUtils::MakeMaker::Version;
856 Defines targets to run *.PL files.
862 return "" unless $self->{PL_FILES};
864 foreach $plfile (sort keys %{$self->{PL_FILES}}) {
865 my $list = ref($self->{PL_FILES}->{$plfile})
866 ? $self->{PL_FILES}->{$plfile}
867 : [$self->{PL_FILES}->{$plfile}];
868 foreach $target (@$list) {
871 \t$self->{NOECHO}\$(NOOP)
874 \t\$(PERL) -I\$(MACPERL_LIB) -I\$(PERL_LIB) $plfile $target