4 # $Id: MakeMaker.pm,v 1.174 1996/02/06 17:03:12 k Exp $
6 package ExtUtils::MakeMaker::TieAtt;
7 # this package will go away again, when we don't have modules around
8 # anymore that import %att It ties an empty %att and records in which
9 # object this %att was tied. FETCH and STORE return/store-to the
10 # appropriate value from %$self
12 # the warndirectuse method warns if somebody calls MM->something. It
13 # has nothing to do with the tie'd %att.
18 bless { SECRETHASH => $_[1]};
22 print "Warning (non-fatal): Importing of %att is deprecated [$_[1]]
23 use \$self instead\n" unless ++$Enough>$Enough_limit;
24 print "Further ExtUtils::MakeMaker::TieAtt warnings suppressed\n" if $Enough==$Enough_limit;
25 $_[0]->{SECRETHASH}->{$_[1]};
29 print "Warning (non-fatal): Importing of %att is deprecated [$_[1]][$_[2]]
30 use \$self instead\n" unless ++$Enough>$Enough_limit;
31 print "Further ExtUtils::MakeMaker::TieAtt warnings suppressed\n" if $Enough==$Enough_limit;
32 $_[0]->{SECRETHASH}->{$_[1]} = $_[2];
36 print "Warning (non-fatal): Importing of %att is deprecated [FIRSTKEY]
37 use \$self instead\n" unless ++$Enough>$Enough_limit;
38 print "Further ExtUtils::MakeMaker::TieAtt warnings suppressed\n" if $Enough==$Enough_limit;
39 each %{$_[0]->{SECRETHASH}};
43 each %{$_[0]->{SECRETHASH}};
51 return if $Enough>$Enough_limit;
52 print STDOUT "Warning (non-fatal): Direct use of class methods deprecated; use\n";
53 my($method) = $caller =~ /.*:(\w+)$/;
56 $self->MM::', $method, "();
58 print "Further ExtUtils::MakeMaker::TieAtt warnings suppressed\n"
59 if ++$Enough==$Enough_limit;
67 package ExtUtils::MakeMaker;
69 $Version = $VERSION = "5.21";
70 $Version_OK = "5.05"; # Makefiles older than $Version_OK will die
71 # (Will be checked from MakeMaker version 4.13 onwards)
72 ($Revision = substr(q$Revision: 1.174 $, 10)) =~ s/\s+$//;
80 require ExtUtils::Manifest;
82 # Current (5.21) FileHandle doesn't work with miniperl, so we roll our own
83 # that's all copy & paste code from FileHandle.pm, version of perl5.002b3
87 @_ >= 1 && @_ <= 3 or croak('usage: new FileHandle [FILENAME [,MODE]]');
91 FileHandle::open($fh, @_)
97 @_ >= 2 && @_ <= 4 or croak('usage: $fh->open(FILENAME [,MODE [,PERMS]])');
100 my ($mode, $perms) = @_[2, 3];
101 if ($mode =~ /^\d+$/) {
102 defined $perms or $perms = 0666;
103 return sysopen($fh, $file, $mode, $perms);
105 $file = "./" . $file unless $file =~ m#^/#;
106 $file = _open_mode_string($mode) . " $file\0";
111 @_ == 1 or croak('usage: $fh->close()');
117 $VERSION $Version_OK $Revision
118 $Verbose %MM_Sections
119 @MM_Sections %Recognized_Att_Keys @Get_from_Config
120 %Prepend_dot_dot %Config @Parent %NORMAL_INC
123 #use strict qw(refs);
125 eval {require DynaLoader;}; # Get mod2fname, if defined. Will fail
129 # Set up the inheritance before we pull in the MM_* packages, because they
130 # import variables and functions from here
133 @EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt);
134 @EXPORT_OK = qw($VERSION &Version_check &help &neatvalue &mkbootstrap &mksymlists
135 $Version %att); ## Import of %att is deprecated, please use OO features!
136 # $Version in mixed case will go away!
139 # Dummy package MM inherits actual methods from OS-specific
140 # default packages. We use this intermediate package so
141 # MY::XYZ->func() can call MM->func() and get the proper
142 # default routine without having to know under what OS
145 @MM::ISA = qw[ExtUtils::MM_Unix ExtUtils::Liblist ExtUtils::MakeMaker];
148 # Setup dummy package:
149 # MY exists for overriding methods to be defined within
158 # From somwhere they will want to inherit DESTROY
163 # Now we can can pull in the friends
164 # Since they will require us back, we would better prepare the needed
165 # data _before_ we require them.
167 $Is_VMS = ($Config{osname} eq 'VMS');
168 $Is_OS2 = ($Config{osname} =~ m|^os/?2$|i);
170 require ExtUtils::MM_Unix;
172 require ExtUtils::MM_VMS;
173 require VMS::Filespec;
174 import VMS::Filespec '&vmsify';
177 require ExtUtils::MM_OS2;
181 # package name for the classes into which the first object will be blessed
182 $PACKNAME = "PACK000";
194 # MakeMaker serves currently (v 5.20) only for two purposes:
195 # Version_Check, and WriteMakefile. For WriteMakefile SelfLoader
196 # doesn't buy us anything. But for Version_Check we win with
197 # SelfLoader more than a second.
199 # The only subroutine we do not SelfLoad is Version_Check because it's
200 # called so often. Loading this minimum still requires 1.2 secs on my
205 my($checkversion) = @_;
206 die "Your Makefile was built with ExtUtils::MakeMaker v $checkversion.
207 Current Version is $ExtUtils::MakeMaker::VERSION. There have been considerable
208 changes in the meantime.
209 Please rerun 'perl Makefile.PL' to regenerate the Makefile.\n"
210 if $checkversion < $Version_OK;
211 printf STDOUT "%s %s %s %s.\n", "Makefile built with ExtUtils::MakeMaker v",
212 $checkversion, "Current Version is", $VERSION
213 unless $checkversion == $VERSION;
216 # We don't selfload this, because chdir sometimes has problems
217 sub eval_in_subdirs {
220 # print "Starting to wade through directories:\n";
221 # print join "\n", @{$self->{DIR}}, "\n";
224 # As strange things happened twice in the history of MakeMaker to $self->{DIR},
225 # lets be careful, maybe it helps some:
226 # my(@copy_of_DIR) = @{$self->{DIR}};
228 # @copy{@copy_od_DIR} = (1) x @copy_of_DIR;
230 # with Tk-9.02 these give me as third directory "1":
231 # foreach $dir (@($self->{DIR}){
232 # foreach $dir (@copy_of_DIR){
234 # this gives mi as third directory a core dump:
235 # while ($dir = shift @copy_of_DIR){
237 # this finishes the loop immediately:
238 # foreach $dir (keys %copy){
239 # print "Next to come: $dir\n";
240 # chdir $dir or die "Couldn't change to directory $dir: $!";
242 # my $fh = new FileHandle;
243 # $fh->open("Makefile.PL") or carp("Couldn't open Makefile.PL in $dir");
244 # my $eval = join "", <$fh>;
247 # warn "WARNING from evaluation of $dir/Makefile.PL: $@" if $@;
248 # chdir $pwd or die "Couldn't change to directory $pwd: $!";
252 # So this did the trick (did it?)
253 foreach $dir (@{$self->{DIR}}){
254 # print "Next to come: $dir\n";
255 my($abs) = $self->catdir($pwd,$dir);
256 $self->eval_in_x($abs);
261 # print "Proudly presenting you self->{DIR}:\n";
262 # print join "\n", @{$self->{DIR}}, "\n";
269 chdir $dir or carp("Couldn't change to directory $dir: $!");
270 my $fh = new FileHandle;
271 $fh->open("Makefile.PL") or carp("Couldn't open Makefile.PL in $dir");
272 my $eval = join "", <$fh>;
275 warn "WARNING from evaluation of $dir/Makefile.PL: $@" if $@;
279 # sub ExtUtils::MakeMaker::full_setup ;
280 # sub ExtUtils::MakeMaker::attrib_help ;
281 # sub ExtUtils::MakeMaker::writeMakefile ;
282 # sub ExtUtils::MakeMaker::WriteMakefile ;
283 # sub ExtUtils::MakeMaker::new ;
284 # sub ExtUtils::MakeMaker::check_manifest ;
285 # sub ExtUtils::MakeMaker::parse_args ;
286 # sub ExtUtils::MakeMaker::check_hints ;
287 # sub ExtUtils::MakeMaker::mv_all_methods ;
288 # sub ExtUtils::MakeMaker::prompt ;
289 # sub ExtUtils::MakeMaker::help ;
290 # sub ExtUtils::MakeMaker::skipcheck ;
291 # sub ExtUtils::MakeMaker::flush ;
292 # sub ExtUtils::MakeMaker::mkbootstrap ;
293 # sub ExtUtils::MakeMaker::mksymlists ;
294 # sub ExtUtils::MakeMaker::neatvalue ;
295 # sub ExtUtils::MakeMaker::selfdocument ;
302 # We're done with inheritance setup. As we have two frequently called
303 # things: Check_Version() and mod_install(), we want to reduce startup
304 # time. Only WriteMakefile needs all the power here.
310 $SIG{__WARN__} = sub {
311 $_[0] =~ /^Use of uninitialized value/ && return;
312 $_[0] =~ /used only once/ && return;
313 $_[0] =~ /^Subroutine\s+[\w:]+\s+redefined/ && return;
319 post_initialize const_config constants const_loadlibs
320 const_cccmd tool_autosplit tool_xsubpp tools_other dist macro
321 depend post_constants pasthru c_o xs_c xs_o top_targets
322 linkext dlsyms dynamic dynamic_bs dynamic_lib static
323 static_lib installpm manifypods processPL installbin subdirs
324 clean realclean dist_basics dist_core dist_dir dist_test
325 dist_ci install force perldepend makefile staticmake test
326 postamble selfdocument
327 ); # loses section ordering
329 @MM_Sections{@MM_Sections} = {} x @MM_Sections;
331 # All sections are valid keys.
332 %Recognized_Att_Keys = %MM_Sections;
334 # we will use all these variables in the Makefile
337 ar cc cccdlflags ccdlflags dlext dlsrc ld lddlflags ldflags libc
338 lib_ext obj_ext ranlib sitelibexp sitearchexp so
342 foreach $item (split(/\n/,attrib_help())){
343 next unless $item =~ m/^=item\s+(\w+)\s*$/;
344 $Recognized_Att_Keys{$1} = $2;
345 print "Attribute '$1' => '$2'\n" if ($Verbose >= 2);
347 foreach $item (@Get_from_Config) {
348 $Recognized_Att_Keys{uc $item} = $Config{$item};
349 print "Attribute '\U$item\E' => '$Config{$item}'\n"
354 # When we pass these through to a Makefile.PL in a subdirectory, we prepend
355 # "..", so that all files to be installed end up below ./blib
359 INST_LIB 1 INST_ARCHLIB 1 INST_EXE 1 MAP_TARGET 1 INST_MAN1DIR 1 INST_MAN3DIR 1
360 PERL_SRC 1 PERL 1 FULLPERL 1
366 return $Attrib_Help if $Attrib_Help;
370 while ($line = <DATA>) {
371 $switch ||= $line =~ /^=item C\s*$/;
373 last if $line =~ /^=cut/;
377 $Attrib_Help = $help;
383 The extension you are trying to build apparently is rather old and
384 most probably outdated. We detect that from the fact, that a
385 subroutine "writeMakefile" is called, and this subroutine is not
386 supported anymore since about October 1994.
388 Please contact the author or look into CPAN (details about CPAN can be
389 found in the FAQ and at http:/www.perl.com) for a more recent version
390 of the extension. If you're really desperate, you can try to change
391 the subroutine name from writeMakefile to WriteMakefile and rerun
392 'perl Makefile.PL', but you're most probably left alone, when you do
401 Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
403 MM->new(\%att)->flush;
407 my($class,$self) = @_;
408 full_setup() unless $Setup_done++;
412 print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
413 if (-f "MANIFEST" && ! -f "Makefile"){
417 $self = {} unless (defined $self);
421 my(%initial_att) = %$self; # record initial attributes
423 if (defined $self->{CONFIGURE}) {
424 if (ref $self->{CONFIGURE} eq 'CODE') {
425 $self = { %$self, %{&{$self->{CONFIGURE}}}};
427 croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n";
431 # This is for old Makefiles written pre 5.00, will go away
432 if ( Carp::longmess("") =~ /runsubdirpl/s ){
433 #$self->{Correct_relativ_directories}++;
434 carp("WARNING: Please rerun 'perl Makefile.PL' to regenerate your Makefiles\n");
436 $self->{Correct_relativ_directories}=0;
439 my $class = ++$PACKNAME;
442 print "Blessing Object into class [$class]\n" if $Verbose>=2;
443 mv_all_methods("MY",$class);
446 @{"$class\:\:ISA"} = 'MM';
449 if (defined $Parent[-2]){
450 $self->{PARENT} = $Parent[-2];
452 for $key (keys %Prepend_dot_dot) {
453 next unless defined $self->{PARENT}{$key};
454 $self->{$key} = $self->{PARENT}{$key};
455 $self->{$key} = $self->catdir("..",$self->{$key})
456 unless $self->{$key} =~ m!^/!;
458 $self->{PARENT}->{CHILDREN}->{$class} = $self if $self->{PARENT};
460 parse_args($self,@ARGV);
463 $self->{NAME} ||= $self->guess_name;
465 ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
469 if (! $self->{PERL_SRC} ) {
470 my($pthinks) = $INC{'Config.pm'};
471 $pthinks = vmsify($pthinks) if $Is_VMS;
472 if ($pthinks ne $self->catfile($Config{archlibexp},'Config.pm')){
473 $pthinks =~ s!/Config\.pm$!!;
476 Your perl and your Config.pm seem to have different ideas about the architecture
478 Perl thinks: [$pthinks]
479 Config says: [$Config{archname}]
480 This may or may not cause problems. Please check your installation of perl if you
481 have problems building this extension.
486 $self->init_dirscan();
487 $self->init_others();
489 push @{$self->{RESULT}}, <<END;
490 # This Makefile is for the $self->{NAME} extension to perl.
492 # It was generated automatically by MakeMaker version
493 # $VERSION (Revision: $Revision) from the contents of
494 # Makefile.PL. Don't edit this file, edit Makefile.PL instead.
496 # ANY CHANGES MADE HERE WILL BE LOST!
498 # MakeMaker Parameters:
501 foreach $key (sort keys %initial_att){
502 my($v) = neatvalue($initial_att{$key});
503 $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
505 push @{$self->{RESULT}}, "# $key => $v";
508 # turn the SKIP array into a SKIPHASH hash
510 for $skip (@{$self->{SKIP} || []}) {
511 $self->{SKIPHASH}{$skip} = 1;
514 # We run all the subdirectories now. They don't have much to query
515 # from the parent, but the parent has to query them: if they need linking!
516 unless ($self->{NORECURS}) {
517 $self->eval_in_subdirs if @{$self->{DIR}};
520 tie %::att, ExtUtils::MakeMaker::TieAtt, $self;
522 foreach $section ( @MM_Sections ){
523 print "Processing Makefile '$section' section\n" if ($Verbose >= 2);
524 my($skipit) = $self->skipcheck($section);
526 push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit.";
528 my(%a) = %{$self->{$section} || {}};
529 push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
530 push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
531 push @{$self->{RESULT}}, $self->nicetext($self->$section( %a ));
535 push @{$self->{RESULT}}, "\n# End.";
542 print STDOUT "Checking if your kit is complete...\n";
543 $ExtUtils::Manifest::Quiet=$ExtUtils::Manifest::Quiet=1; #avoid warning
544 my(@missed)=ExtUtils::Manifest::manicheck();
546 print STDOUT "Warning: the following files are missing in your kit:\n";
547 print "\t", join "\n\t", @missed;
549 print STDOUT "Please inform the author.\n";
551 print STDOUT "Looks good\n";
556 my($self, @args) = @_;
558 unless (m/(.*?)=(.*)/){
559 help(),exit 1 if m/^help$/;
560 ++$Verbose if m/^verb/;
563 my($name, $value) = ($1, $2);
564 if ($value =~ m/^~(\w+)?/){ # tilde with optional username
565 $value =~ s [^~(\w*)]
567 ((getpwnam($1))[7] || "~$1") :
571 # This may go away, in mid 1996
572 if ($self->{Correct_relativ_directories}){
573 $value = $self->catdir("..",$value)
574 if $Prepend_dot_dot{$name} && ! $value =~ m!^/!;
576 $self->{uc($name)} = $value;
578 # This may go away, in mid 1996
579 delete $self->{Correct_relativ_directories};
581 # catch old-style 'potential_libs' and inform user how to 'upgrade'
582 if (defined $self->{potential_libs}){
583 my($msg)="'potential_libs' => '$self->{potential_libs}' should be";
584 if ($self->{potential_libs}){
585 print STDOUT "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n";
587 print STDOUT "$msg deleted.\n";
589 $self->{LIBS} = [$self->{potential_libs}];
590 delete $self->{potential_libs};
592 # catch old-style 'ARMAYBE' and inform user how to 'upgrade'
593 if (defined $self->{ARMAYBE}){
594 my($armaybe) = $self->{ARMAYBE};
595 print STDOUT "ARMAYBE => '$armaybe' should be changed to:\n",
596 "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n";
597 my(%dl) = %{$self->{dynamic_lib} || {}};
598 $self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe};
599 delete $self->{ARMAYBE};
601 if (defined $self->{LDTARGET}){
602 print STDOUT "LDTARGET should be changed to LDFROM\n";
603 $self->{LDFROM} = $self->{LDTARGET};
604 delete $self->{LDTARGET};
606 # Turn a DIR argument on the command line into an array
607 if (defined $self->{DIR} && ref \$self->{DIR} eq 'SCALAR') {
608 # So they can choose from the command line, which extensions they want
609 # the grep enables them to have some colons too much in case they
610 # have to build a list with the shell
611 $self->{DIR} = [grep $_, split ":", $self->{DIR}];
614 foreach $mmkey (sort keys %$self){
615 print STDOUT " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose;
616 print STDOUT "'$mmkey' is not a known MakeMaker parameter name.\n"
617 unless exists $Recognized_Att_Keys{$mmkey};
623 # We allow extension-specific hints files.
625 return unless -d "hints";
627 # First we look for the best hintsfile we have
629 my($hint)="$Config{osname}_$Config{osvers}";
634 # Also try without trailing minor version numbers.
636 last if -f "hints/$hint.pl"; # found
638 last unless $hint =~ s/_[^_]*$//; # nothing to cut off
640 return unless -f "hints/$hint.pl"; # really there
642 # execute the hintsfile:
643 my $fh = new FileHandle;
644 $fh->open("hints/$hint.pl");
647 print STDOUT "Processing hints file hints/$hint.pl\n";
648 eval join('',@goodhints);
649 print STDOUT $@ if $@;
655 my($symtab) = \%{"${from}::"};
658 # Here you see the *current* list of methods that are overridable
659 # from Makefile.PL via MY:: subroutines. As of VERSION 5.07 I'm
660 # still trying to reduce the list to some reasonable minimum --
661 # because I want to make it easier for the user. A.K.
663 foreach $method (@MM_Sections, qw[ dir_target
664 fileparse fileparse_set_fstype installpm_x libscan makeaperl
665 mksymlists needs_linking subdir_x test_via_harness
666 test_via_script writedoc ]) {
668 # We cannot say "next" here. Nick might call MY->makeaperl
669 # which isn't defined right now
671 # next unless defined &{"${from}::$method"};
673 *{"${to}::$method"} = \&{"${from}::$method"};
675 # delete would do, if we were sure, nobody ever called
676 # MY->makeaperl directly
678 # delete $symtab->{$method};
680 # If we delete a method, then it will be undefined and cannot
681 # be called. But as long as we have Makefile.PLs that rely on
682 # %MY:: being intact, we have to fill the hole with an
685 eval "package MY; sub $method {local *$method; shift->MY::$method(\@_); }";
689 # We have to clean out %INC also, because the current directory is
690 # changed frequently and Graham Barr prefers to get his version
691 # out of a History.pl file which is "required" so woudn't get
692 # loaded again in another extension requiring a History.pl
695 foreach $inc (keys %INC) {
696 next if $NORMAL_INC{$inc};
697 #warn "***$inc*** deleted";
705 BEGIN { $ISA_TTY = -t STDIN && -t STDOUT }
706 Carp::confess("prompt function called without an argument") unless defined $mess;
707 $def = "" unless defined $def;
708 my $dispdef = "[$def] ";
712 print "$mess $dispdef";
713 chop($ans = <STDIN>);
715 return $ans if defined $ans;
719 sub help {print &attrib_help, "\n";}
724 if ($section eq 'dynamic') {
725 print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
726 "in skipped section 'dynamic_bs'\n"
727 if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
728 print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
729 "in skipped section 'dynamic_lib'\n"
730 if $self->{SKIPHASH}{dynamic_lib} && $Verbose;
732 if ($section eq 'dynamic_lib') {
733 print STDOUT "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ",
734 "targets in skipped section 'dynamic_bs'\n"
735 if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
737 if ($section eq 'static') {
738 print STDOUT "Warning (non-fatal): Target 'static' depends on targets ",
739 "in skipped section 'static_lib'\n"
740 if $self->{SKIPHASH}{static_lib} && $Verbose;
742 return 'skipped' if $self->{SKIPHASH}{$section};
749 my $fh = new FileHandle;
750 print STDOUT "Writing $self->{MAKEFILE} for $self->{NAME}\n";
752 unlink($self->{MAKEFILE}, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : '');
753 $fh->open(">MakeMaker.tmp") or die "Unable to open MakeMaker.tmp: $!";
755 for $chunk (@{$self->{RESULT}}) {
756 print $fh "$chunk\n";
760 my($finalname) = $self->{MAKEFILE};
761 rename("MakeMaker.tmp", $finalname);
762 chmod 0644, $finalname unless $Is_VMS;
763 system("$Config::Config{eunicefix} $finalname") unless $Config::Config{eunicefix} eq ":";
766 # The following mkbootstrap() is only for installations that are calling
767 # the pre-4.1 mkbootstrap() from their old Makefiles. This MakeMaker
768 # writes Makefiles, that use ExtUtils::Mkbootstrap directly.
771 !!! Your Makefile has been built such a long time ago, !!!
772 !!! that is unlikely to work with current MakeMaker. !!!
773 !!! Please rebuild your Makefile !!!
777 # Ditto for mksymlists() as of MakeMaker 5.17
780 !!! Your Makefile has been built such a long time ago, !!!
781 !!! that is unlikely to work with current MakeMaker. !!!
782 !!! Please rebuild your Makefile !!!
788 return "undef" unless defined $v;
790 return "q[$v]" unless $t;
792 my(@m, $elem, @neat);
794 foreach $elem (@$v) {
795 push @neat, "q[$elem]";
797 push @m, join ", ", @neat;
801 return "$v" unless $t eq 'HASH';
803 push(@m,"$key=>".neatvalue($val)) while (($key,$val) = each %$v);
804 return "{ ".join(', ',@m)." }";
811 push @m, "\n# Full list of MakeMaker attribute values:";
812 foreach $key (sort keys %$self){
813 next if $key eq 'RESULT' || $key =~ /^[A-Z][a-z]/;
814 my($v) = neatvalue($self->{$key});
815 $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
817 push @m, "# $key => $v";
823 package ExtUtils::MakeMaker;
826 # Without selfLoader we need
830 # For SelfLoader we need
836 ExtUtils::MakeMaker - create an extension Makefile
840 C<use ExtUtils::MakeMaker;>
842 C<WriteMakefile( ATTRIBUTE =E<gt> VALUE [, ...] );>
846 C<MM-E<gt>new(\%att)-E<gt>flush;>
850 This utility is designed to write a Makefile for an extension module
851 from a Makefile.PL. It is based on the Makefile.SH model provided by
852 Andy Dougherty and the perl5-porters.
854 It splits the task of generating the Makefile into several subroutines
855 that can be individually overridden. Each subroutine returns the text
856 it wishes to have written to the Makefile.
858 =head2 Hintsfile support
860 MakeMaker.pm uses the architecture specific information from
861 Config.pm. In addition it evaluates architecture specific hints files
862 in a C<hints/> directory. The hints files are expected to be named
863 like their counterparts in C<PERL_SRC/hints>, but with an C<.pl> file
864 name extension (eg. C<next_3_2.pl>). They are simply C<eval>ed by
865 MakeMaker within the WriteMakefile() subroutine, and can be used to
866 execute commands as well as to include special variables. The rules
867 which hintsfile is chosen are the same as in Configure.
869 The hintsfile is eval()ed immediately after the arguments given to
870 WriteMakefile are stuffed into a hash reference $self but before this
871 reference becomes blessed. So if you want to do the equivalent to
872 override or create an attribute you would say something like
874 $self->{LIBS} = ['-ldbm -lucb -lc'];
876 =head2 What's new in version 5 of MakeMaker
878 MakeMaker 5 is pure object oriented. This allows us to write an
879 unlimited number of Makefiles with a single perl process. 'perl
880 Makefile.PL' with MakeMaker 5 goes through all subdirectories
881 immediately and evaluates any Makefile.PL found in the next level
882 subdirectories. The benefit of this approach comes in useful for both
883 single and multi directories extensions.
885 Multi directory extensions have an immediately visible speed
886 advantage, because there's no startup penalty for any single
887 subdirectory Makefile.
889 Single directory packages benefit from the much improved
890 needs_linking() method. As the main Makefile knows everything about
891 the subdirectories, a needs_linking() method can now query all
892 subdirectories if there is any linking involved down in the tree. The
893 speedup for PM-only Makefiles seems to be around 1 second on my
896 =head2 Incompatibilities between MakeMaker 5.00 and 4.23
898 There are no incompatibilities in the short term, as all changes are
899 accompanied by short-term workarounds that guarantee full backwards
902 You are likely to face a few warnings that expose deprecations which
903 will result in incompatibilities in the long run:
905 You should not use %att directly anymore. Instead any subroutine you
906 override in the MY package will be called by the object method, so you
907 can access all object attributes directly via the object in $_[0].
909 You should not call the class methos MM->something anymore. Instead
910 you should call the superclass. Something like
914 $self->MM::constants();
917 Especially the libscan() and exescan() methods should be altered
918 towards OO programming, that means do not expect that $_ to contain
919 the path but rather $_[1].
921 Try to build several extensions simultanously to debug your
922 Makefile.PL. You can unpack a bunch of distributed packages within one
925 perl -MExtUtils::MakeMaker -e 'WriteMakefile()'
927 That's actually fun to watch :)
929 Final suggestion: Try to delete all of your MY:: subroutines and
930 watch, if you really still need them. MakeMaker might already do what
931 you want without them. That's all about it.
934 =head2 Default Makefile Behaviour
936 The automatically generated Makefile enables the user of the extension
939 perl Makefile.PL # optionally "perl Makefile.PL verbose"
941 make test # optionally set TEST_VERBOSE=1
942 make install # See below
944 The Makefile to be produced may be altered by adding arguments of the
945 form C<KEY=VALUE>. E.g.
947 perl Makefile.PL PREFIX=/tmp/myperl5
949 Other interesting targets in the generated Makefile are
951 make config # to check if the Makefile is up-to-date
952 make clean # delete local temp files (Makefile gets renamed)
953 make realclean # delete derived files (including ./blib)
954 make ci # check in all the files in the MANIFEST file
955 make dist # see below the Distribution Support section
959 MakeMaker checks for the existence of a file named "test.pl" in the
960 current directory and if it exists it adds commands to the test target
961 of the generated Makefile that will execute the script with the proper
962 set of perl C<-I> options.
964 MakeMaker also checks for any files matching glob("t/*.t"). It will
965 add commands to the test target of the generated Makefile that execute
966 all matching files via the L<Test::Harness> module with the C<-I>
967 switches set correctly.
971 make alone puts all relevant files into directories that are named by
972 the macros INST_LIB, INST_ARCHLIB, INST_EXE, INST_MAN1DIR, and
973 INST_MAN3DIR. All these default to something below ./blib if
974 you are I<not> building below the perl source directory. If you I<are>
975 building below the perl source, INST_LIB and INST_ARCHLIB default to
976 ../../lib, and INST_EXE is not defined.
978 The I<install> target of the generated Makefile copies the files found
979 below each of the INST_* directories to their INSTALL*
980 counterparts. Which counterparts are chosen depends on the setting of
981 INSTALLDIRS according to the following table:
986 INST_LIB INSTALLPRIVLIB INSTALLSITELIB
987 INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH
989 INST_MAN1DIR INSTALLMAN1DIR
990 INST_MAN3DIR INSTALLMAN3DIR
992 The INSTALL... macros in turn default to their %Config
993 ($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts.
995 If you don't want to keep the defaults, MakeMaker helps you to
996 minimize the typing needed: the usual relationship between
997 INSTALLPRIVLIB and INSTALLARCHLIB is determined by Configure at perl
998 compilation time. MakeMaker supports the user who sets
999 INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not, then
1000 MakeMaker defaults the latter to be the same subdirectory of
1001 INSTALLPRIVLIB as Configure decided for the counterparts in %Config ,
1002 otherwise it defaults to INSTALLPRIVLIB. The same relationship holds
1003 for INSTALLSITELIB and INSTALLSITEARCH.
1005 MakeMaker gives you much more freedom than needed to configure
1006 internal variables and get different results. It is worth to mention,
1007 that make(1) also lets you configure most of the variables that are
1008 used in the Makefile. But in the majority of situations this will not
1009 be necessary, and should only be done, if the author of a package
1013 =head2 PREFIX attribute
1015 The PREFIX attribute can be used to set the INSTALL* attributes in one
1016 go. The quickest way to install a module in a non-standard place
1018 perl Makefile.PL PREFIX=~
1020 This will replace the string specified by $Config{prefix} in all
1021 $Config{install*} values.
1023 Note, that the tilde expansion is done by MakeMaker, not by perl by
1024 default, nor by make.
1026 If the user has superuser privileges, and is not working on AFS
1027 (Andrew File System) or relatives, then the defaults for
1028 INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLBIN, etc. will be appropriate,
1029 and this incantation will be the best:
1031 perl Makefile.PL; make; make test
1034 make install per default writes some documentation of what has been
1035 done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This feature
1036 can be bypassed by calling make pure_install.
1040 will have to specify the installation directories as these most
1041 probably have changed since perl itself has been installed. They will
1042 have to do this by calling
1044 perl Makefile.PL INSTALLSITELIB=/afs/here/today \
1045 INSTALLBIN=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages
1048 Be careful to repeat this procedure every time you recompile an
1049 extension, unless you are sure the AFS installation directories are
1052 =head2 Static Linking of a new Perl Binary
1054 An extension that is built with the above steps is ready to use on
1055 systems supporting dynamic loading. On systems that do not support
1056 dynamic loading, any newly created extension has to be linked together
1057 with the available resources. MakeMaker supports the linking process
1058 by creating appropriate targets in the Makefile whenever an extension
1059 is built. You can invoke the corresponding section of the makefile with
1063 That produces a new perl binary in the current directory with all
1064 extensions linked in that can be found in INST_ARCHLIB , SITELIBEXP,
1065 and PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on
1066 UNIX, this is called Makefile.aperl (may be system dependent). If you
1067 want to force the creation of a new perl, it is recommended, that you
1068 delete this Makefile.aperl, so the directories are searched-through
1069 for linkable libraries again.
1071 The binary can be installed into the directory where perl normally
1072 resides on your machine with
1076 To produce a perl binary with a different name than C<perl>, either say
1078 perl Makefile.PL MAP_TARGET=myperl
1085 make myperl MAP_TARGET=myperl
1086 make inst_perl MAP_TARGET=myperl
1088 In any case you will be prompted with the correct invocation of the
1089 C<inst_perl> target that installs the new binary into INSTALLBIN.
1091 make inst_perl per default writes some documentation of what has been
1092 done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This
1093 can be bypassed by calling make pure_inst_perl.
1095 Warning: the inst_perl: target will most probably overwrite your
1096 existing perl binary. Use with care!
1098 Sometimes you might want to build a statically linked perl although
1099 your system supports dynamic loading. In this case you may explicitly
1100 set the linktype with the invocation of the Makefile.PL or make:
1102 perl Makefile.PL LINKTYPE=static # recommended
1106 make LINKTYPE=static # works on most systems
1108 =head2 Determination of Perl Library and Installation Locations
1110 MakeMaker needs to know, or to guess, where certain things are
1111 located. Especially INST_LIB and INST_ARCHLIB (where to put the files
1112 during the make(1) run), PERL_LIB and PERL_ARCHLIB (where to read
1113 existing modules from), and PERL_INC (header files and C<libperl*.*>).
1115 Extensions may be built either using the contents of the perl source
1116 directory tree or from the installed perl library. The recommended way
1117 is to build extensions after you have run 'make install' on perl
1118 itself. You can do that in any directory on your hard disk that is not
1119 below the perl source tree. The support for extensions below the ext
1120 directory of the perl distribution is only good for the standard
1121 extensions that come with perl.
1123 If an extension is being built below the C<ext/> directory of the perl
1124 source then MakeMaker will set PERL_SRC automatically (e.g.,
1125 C<../..>). If PERL_SRC is defined and the extension is recognized as
1126 a standard extension, then other variables default to the following:
1129 PERL_LIB = PERL_SRC/lib
1130 PERL_ARCHLIB = PERL_SRC/lib
1132 INST_ARCHLIB = PERL_ARCHLIB
1134 If an extension is being built away from the perl source then MakeMaker
1135 will leave PERL_SRC undefined and default to using the installed copy
1136 of the perl library. The other variables default to the following:
1138 PERL_INC = $archlibexp/CORE
1139 PERL_LIB = $privlibexp
1140 PERL_ARCHLIB = $archlibexp
1141 INST_LIB = ./blib/lib
1142 INST_ARCHLIB = ./blib/arch
1144 If perl has not yet been installed then PERL_SRC can be defined on the
1145 command line as shown in the previous section.
1147 =head2 Useful Default Makefile Macros
1149 FULLEXT = Pathname for extension directory (eg DBD/Oracle).
1151 BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
1153 ROOTEXT = Directory part of FULLEXT with leading slash (eg /DBD)
1155 INST_LIBDIR = C<$(INST_LIB)$(ROOTEXT)>
1157 INST_AUTODIR = C<$(INST_LIB)/auto/$(FULLEXT)>
1159 INST_ARCHAUTODIR = C<$(INST_ARCHLIB)/auto/$(FULLEXT)>
1161 =head2 Using Attributes and Parameters
1163 The following attributes can be specified as arguments to WriteMakefile()
1164 or as NAME=VALUE pairs on the command line:
1168 # The following "=item C" is used by the attrib_help routine
1169 # likewise the "=back" below. So be careful when changing it!
1175 Ref to array of *.c file names. Initialised from a directory scan
1176 and the values portion of the XS attribute hash. This is not
1177 currently used by MakeMaker but may be handy in Makefile.PLs.
1181 Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from
1182 config.sh. MakeMaker will add to CONFIG the following values anyway:
1202 CODE reference. The subroutine should return a hash reference. The
1203 hash may contain further attributes, e.g. {LIBS => ...}, that have to
1204 be determined by some evaluation method.
1208 Something like C<"-DHAVE_UNISTD_H">
1212 Ref to array of subdirectories containing Makefile.PLs e.g. [ 'sdbm'
1217 Your name for distributing the package (by tar file). This defaults to
1222 Hashref of symbol names for routines to be made available as
1223 universal symbols. Each key/value pair consists of the package name
1224 and an array of routine names in that package. Used only under AIX
1225 (export lists) and VMS (linker options) at present. The routine
1226 names supplied will be expanded in the same way as XSUB names are
1227 expanded by the XS() macro. Defaults to
1229 {"$(NAME)" => ["boot_$(NAME)" ] }
1233 {"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
1234 "NetconfigPtr" => [ 'DESTROY'] }
1238 Array of symbol names for variables to be made available as
1239 universal symbols. Used only under AIX (export lists) and VMS
1240 (linker options) at present. Defaults to []. (e.g. [ qw(
1241 Foo_version Foo_numstreams Foo_tree ) ])
1245 Ref to array of executable files. The files will be copied to the
1246 INST_EXE directory. Make realclean will delete them from there
1249 =item FIRST_MAKEFILE
1251 The name of the Makefile to be produced. Defaults to the contents of
1252 MAKEFILE, but can be overridden. This is used for the second Makefile
1253 that will be produced for the MAP_TARGET.
1257 Perl binary able to run this extension.
1261 Ref to array of *.h file names. Similar to C.
1265 Include file dirs eg: C<"-I/usr/5include -I/path/to/inc">
1267 =item INSTALLARCHLIB
1269 Used by 'make install', which copies files from INST_ARCHLIB to this
1270 directory if INSTALLDIRS is set to perl.
1274 Used by 'make install' which copies files from INST_EXE to this
1279 Determines which of the two sets of installation directories to
1280 choose: installprivlib and installarchlib versus installsitelib and
1281 installsitearch. The first pair is chosen with INSTALLDIRS=perl, the
1282 second with INSTALLDIRS=site. Default is site.
1284 =item INSTALLMAN1DIR
1286 This directory gets the man pages at 'make install' time. Defaults to
1287 $Config{installman1dir}.
1289 =item INSTALLMAN3DIR
1291 This directory gets the man pages at 'make install' time. Defaults to
1292 $Config{installman3dir}.
1294 =item INSTALLPRIVLIB
1296 Used by 'make install', which copies files from INST_LIB to this
1297 directory if INSTALLDIRS is set to perl.
1299 =item INSTALLSITELIB
1301 Used by 'make install', which copies files from INST_LIB to this
1302 directory if INSTALLDIRS is set to site (default).
1304 =item INSTALLSITEARCH
1306 Used by 'make install', which copies files from INST_ARCHLIB to this
1307 directory if INSTALLDIRS is set to site (default).
1311 Same as INST_LIB for architecture dependent files.
1315 Directory, where executable scripts should be installed during
1316 'make'. Defaults to "./blib/bin", just to have a dummy location during
1317 testing. make install will copy the files in INST_EXE to INSTALLBIN.
1321 Directory where we put library files of this extension while building
1326 Directory to hold the man pages at 'make' time
1330 Directory to hold the man pages at 'make' time
1334 defaults to "$(OBJECT)" and is used in the ld command to specify
1335 what files to link/load from (also see dynamic_lib below for how to
1340 The filename of the perllibrary that will be used together with this
1341 extension. Defaults to libperl.a.
1345 An anonymous array of alternative library
1346 specifications to be searched for (in order) until
1347 at least one library is found. E.g.
1349 'LIBS' => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"]
1351 Mind, that any element of the array
1352 contains a complete set of arguments for the ld
1353 command. So do not specify
1355 'LIBS' => ["-ltcl", "-ltk", "-lX11"]
1357 See ODBM_File/Makefile.PL for an example, where an array is needed. If
1358 you specify a scalar as in
1360 'LIBS' => "-ltcl -ltk -lX11"
1362 MakeMaker will turn it into an array with one element.
1366 'static' or 'dynamic' (default unless usedl=undef in
1367 config.sh). Should only be used to force static linking (also see
1372 Boolean which tells MakeMaker, that it should include the rules to
1373 make a perl. This is handled automatically as a switch by
1374 MakeMaker. The user normally does not need it.
1378 The name of the Makefile to be produced.
1382 Hashref of pod-containing files. MakeMaker will default this to all
1383 EXE_FILES files that include POD directives. The files listed
1384 here will be converted to man pages and installed as was requested
1389 Hashref of .pm and .pod files. MakeMaker will default this to all
1390 .pod and any .pm files that include POD directives. The files listed
1391 here will be converted to man pages and installed as was requested
1396 If it is intended, that a new perl binary be produced, this variable
1397 may hold a name for that binary. Defaults to perl
1401 If the extension links to a library that it builds set this to the
1402 name of the library (see SDBM_File)
1406 Perl module name for this extension (DBD::Oracle). This will default
1407 to the directory name but should be explicitly defined in the
1412 MakeMaker will figure out, if an extension contains linkable code
1413 anywhere down the directory tree, and will set this variable
1414 accordingly, but you can speed it up a very little bit, if you define
1415 this boolean variable yourself.
1419 Defaults the C<@>. By setting it to an empty string you can generate a
1420 Makefile that echos all commands. Mainly used in debugging MakeMaker
1425 Boolean. Attribute to inhibit descending into subdirectories.
1429 List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long
1430 string containing all object files, e.g. "tkpBind.o
1431 tkpButton.o tkpCanvas.o"
1435 Perl binary for tasks that can be done by miniperl
1439 The call to the program that is able to compile perlmain.c. Defaults
1444 Same as above for architecture dependent files
1448 Directory containing the Perl library to use.
1452 Directory containing the Perl source code (use of this should be
1453 avoided, it may be undefined)
1457 Ref to hash of files to be processed as perl programs. MakeMaker
1458 will default to any found *.PL file (except Makefile.PL) being keys
1459 and the basename of the file being the value. E.g.
1461 {'foobar.PL' => 'foobar'}
1463 The *.PL files are expected to produce output to the target files
1468 Hashref of .pm files and *.pl files to be installed. e.g.
1470 {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}
1472 By default this will include *.pm and *.pl. If a lib directory
1473 exists and is not listed in DIR (above) then any *.pm and *.pl files
1474 it contains will also be included by default. Defining PM in the
1475 Makefile.PL will override PMLIBDIRS.
1479 Ref to array of subdirectories containing library files. Defaults to
1480 [ 'lib', $(BASEEXT) ]. The directories will be scanned and any files
1481 they contain will be installed in the corresponding location in the
1482 library. A libscan() method can be used to alter the behaviour.
1483 Defining PM in the Makefile.PL will override PMLIBDIRS.
1487 Can be used to set the three INSTALL* attributes in one go (except for
1488 probably INSTALLMAN1DIR, if it is not below PREFIX according to
1489 %Config). They will have PREFIX as a common directory node and will
1490 branch from that node into lib/, lib/ARCHNAME or whatever Configure
1491 decided at the build time of your perl (unless you override one of
1496 Placeholder, not yet implemented. Will eventually be a hashref: Names
1497 of modules that need to be available to run this extension (e.g. Fcntl
1498 for SDBM_File) are the keys of the hash and the desired version is the
1499 value. Needs further evaluation, should probably allow to define
1500 prerequisites among header files, libraries, perl version, etc.
1504 Arryref. E.g. [qw(name1 name2)] skip (do not write) sections of the
1509 Ref to array of typemap file names. Use this when the typemaps are
1510 in some directory other than the current directory or when they are
1511 not named B<typemap>. The last typemap in the list takes
1512 precedence. A typemap in the current directory has highest
1513 precedence, even if it isn't listed in TYPEMAPS. The default system
1514 typemap has lowest precedence.
1518 Your version number for distributing the package. This defaults to
1523 Instead of specifying the VERSION in the Makefile.PL you can let
1524 MakeMaker parse a file to determine the version number. The parsing
1525 routine requires that the file named by VERSION_FROM contains one
1526 single line to compute the version number. The first line in the file
1527 that contains the regular expression
1529 /(\$[\w:]*\bVERSION)\b.*=/
1531 will be evaluated with eval() and the value of the named variable
1532 B<after> the eval() will be assigned to the VERSION attribute of the
1533 MakeMaker object. The following lines will be parsed o.k.:
1536 ( $VERSION ) = '$Revision: 1.174 $ ' =~ /\$Revision:\s+([^\s]+)/;
1537 $FOO::VERSION = '1.10';
1539 but these will fail:
1541 my $VERSION = '1.01';
1542 local $VERSION = '1.02';
1543 local $FOO::VERSION = '1.30';
1545 The file named in VERSION_FROM is added as a dependency to Makefile to
1546 guarantee, that the Makefile contains the correct VERSION macro after
1547 a change of the file.
1551 Hashref of .xs files. MakeMaker will default this. e.g.
1553 {'name_of_file.xs' => 'name_of_file.c'}
1555 The .c files will automatically be included in the list of files
1556 deleted by a make clean.
1560 String of options to pass to xsubpp. This might include C<-C++> or
1561 C<-extern>. Do not include typemaps here; the TYPEMAP parameter exists for
1566 May be set to an empty string, which is identical to C<-prototypes>, or
1567 C<-noprototypes>. See the xsubpp documentation for details. MakeMaker
1568 defaults to the empty string.
1572 Your version number for the .xs file of this package. This defaults
1573 to the value of the VERSION attribute.
1577 =head2 Additional lowercase attributes
1579 can be used to pass parameters to the methods which implement that
1580 part of the Makefile. These are not normally required:
1586 {FILES => "*.xyz foo"}
1590 {ANY_TARGET => ANY_DEPENDECY, ...}
1594 {TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => 'gz',
1595 SHAR => 'shar -m', DIST_CP => 'ln'}
1597 If you specify COMPRESS, then SUFFIX should also be altered, as it is
1598 needed to tell make the target file of the compression. Setting
1599 DIST_CP to ln can be useful, if you need to preserve the timestamps on
1600 your files. DIST_CP can take the values 'cp', which copies the file,
1601 'ln', which links the file, and 'best' which copies symbolic links and
1602 links the rest. Default is 'best'.
1606 {ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'}
1610 {SPLITLIB => '$(INST_LIB)' (default) or '$(INST_ARCHLIB)'}
1614 {LINKTYPE => 'static', 'dynamic' or ''}
1616 NB: Extensions that have nothing but *.pm files had to say
1620 with Pre-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line
1621 can be deleted safely. MakeMaker recognizes, when there's nothing to
1626 {ANY_MACRO => ANY_VALUE, ...}
1630 {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
1632 =item tool_autosplit
1640 # bug in pod2html, so leave the =back
1642 # Don't delete this cut, MM depends on it!
1644 =head2 Overriding MakeMaker Methods
1646 If you cannot achieve the desired Makefile behaviour by specifying
1647 attributes you may define private subroutines in the Makefile.PL.
1648 Each subroutines returns the text it wishes to have written to
1649 the Makefile. To override a section of the Makefile you can
1652 sub MY::c_o { "new literal text" }
1654 or you can edit the default by saying something like:
1660 s/old text/new text/;
1664 Both methods above are available for backwards compatibility with
1667 If you still need a different solution, try to develop another
1668 subroutine, that fits your needs and submit the diffs to
1669 F<perl5-porters@nicoh.com> or F<comp.lang.perl.misc> as appropriate.
1671 =head2 Distribution Support
1673 For authors of extensions MakeMaker provides several Makefile
1674 targets. Most of the support comes from the ExtUtils::Manifest module,
1675 where additional documentation can be found.
1679 =item make distcheck
1681 reports which files are below the build directory but not in the
1682 MANIFEST file and vice versa. (See ExtUtils::Manifest::fullcheck() for
1685 =item make skipcheck
1687 reports which files are skipped due to the entries in the
1688 C<MANIFEST.SKIP> file (See ExtUtils::Manifest::skipcheck() for
1691 =item make distclean
1693 does a realclean first and then the distcheck. Note that this is not
1694 needed to build a new distribution as long as you are sure, that the
1695 MANIFEST file is ok.
1699 rewrites the MANIFEST file, adding all remaining files found (See
1700 ExtUtils::Manifest::mkmanifest() for details)
1704 Copies all the files that are in the MANIFEST file to a newly created
1705 directory with the name C<$(DISTNAME)-$(VERSION)>. If that directory
1706 exists, it will be removed first.
1710 Makes a distdir first, and runs a C<perl Makefile.PL>, a make, and
1711 a make test in that directory.
1715 First does a command $(PREOP) which defaults to a null command. Does a
1716 distdir next and runs C<tar> on that directory into a tarfile. Then
1717 deletes the distdir. Finishes with a command $(POSTOP) which defaults
1722 Defaults to $(DIST_DEFAULT) which in turn defaults to tardist.
1724 =item make uutardist
1726 Runs a tardist first and uuencodes the tarfile.
1730 First does a command $(PREOP) which defaults to a null command. Does a
1731 distdir next and runs C<shar> on that directory into a sharfile. Then
1732 deletes the distdir. Finishes with a command $(POSTOP) which defaults
1733 to a null command. Note: For shdist to work properly a C<shar>
1734 program that can handle directories is mandatory.
1738 Does a $(CI) and a $(RCS_LABEL) on all files in the MANIFEST file.
1742 Customization of the dist targets can be done by specifying a hash
1743 reference to the dist attribute of the WriteMakefile call. The
1744 following parameters are recognized:
1747 COMPRESS ('compress')
1750 RCS_LABEL ('rcs -q -Nv$(VERSION_SYM):')
1758 WriteMakefile( 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" })
1763 Andy Dougherty F<E<lt>doughera@lafcol.lafayette.eduE<gt>>, Andreas
1764 KE<ouml>nig F<E<lt>A.Koenig@franz.ww.TU-Berlin.DEE<gt>>, Tim Bunce
1765 F<E<lt>Tim.Bunce@ig.co.ukE<gt>>. VMS support by Charles Bailey
1766 F<E<lt>bailey@genetics.upenn.eduE<gt>>. OS/2 support by Ilya
1767 Zakharevich F<E<lt>ilya@math.ohio-state.eduE<gt>>. Contact the
1768 makemaker mailing list C<mailto:makemaker@franz.ww.tu-berlin.de>, if
1769 you have any questions.
1771 =head1 MODIFICATION HISTORY
1773 For a more complete documentation see the file Changes in the
1774 MakeMaker distribution package.
1778 See the file Todo in the MakeMaker distribution package.