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 # No we can can pull in the friends
165 require ExtUtils::MM_Unix;
166 if ($Is_VMS = ($Config{osname} eq 'VMS')) {
167 require ExtUtils::MM_VMS;
168 require VMS::Filespec;
169 import VMS::Filespec '&vmsify';
171 if ($Is_OS2 = $Config{osname} =~ m|^os/?2$|i) {
172 require ExtUtils::MM_OS2;
176 # package name for the classes into which the first object will be blessed
177 $PACKNAME = "PACK000";
189 # MakeMaker serves currently (v 5.20) only for two purposes:
190 # Version_Check, and WriteMakefile. For WriteMakefile SelfLoader
191 # doesn't buy us anything. But for Version_Check we win with
192 # SelfLoader more than a second.
194 # The only subroutine we do not SelfLoad is Version_Check because it's
195 # called so often. Loading this minimum still requires 1.2 secs on my
200 my($checkversion) = @_;
201 die "Your Makefile was built with ExtUtils::MakeMaker v $checkversion.
202 Current Version is $ExtUtils::MakeMaker::VERSION. There have been considerable
203 changes in the meantime.
204 Please rerun 'perl Makefile.PL' to regenerate the Makefile.\n"
205 if $checkversion < $Version_OK;
206 printf STDOUT "%s %s %s %s.\n", "Makefile built with ExtUtils::MakeMaker v",
207 $checkversion, "Current Version is", $VERSION
208 unless $checkversion == $VERSION;
211 # We don't selfload this, because chdir sometimes has problems
212 sub eval_in_subdirs {
215 # print "Starting to wade through directories:\n";
216 # print join "\n", @{$self->{DIR}}, "\n";
219 # As strange things happened twice in the history of MakeMaker to $self->{DIR},
220 # lets be careful, maybe it helps some:
221 # my(@copy_of_DIR) = @{$self->{DIR}};
223 # @copy{@copy_od_DIR} = (1) x @copy_of_DIR;
225 # with Tk-9.02 these give me as third directory "1":
226 # foreach $dir (@($self->{DIR}){
227 # foreach $dir (@copy_of_DIR){
229 # this gives mi as third directory a core dump:
230 # while ($dir = shift @copy_of_DIR){
232 # this finishes the loop immediately:
233 # foreach $dir (keys %copy){
234 # print "Next to come: $dir\n";
235 # chdir $dir or die "Couldn't change to directory $dir: $!";
237 # my $fh = new FileHandle;
238 # $fh->open("Makefile.PL") or carp("Couldn't open Makefile.PL in $dir");
239 # my $eval = join "", <$fh>;
242 # warn "WARNING from evaluation of $dir/Makefile.PL: $@" if $@;
243 # chdir $pwd or die "Couldn't change to directory $pwd: $!";
247 # So this did the trick (did it?)
248 foreach $dir (@{$self->{DIR}}){
249 # print "Next to come: $dir\n";
250 my($abs) = $self->catdir($pwd,$dir);
251 $self->eval_in_x($abs);
256 # print "Proudly presenting you self->{DIR}:\n";
257 # print join "\n", @{$self->{DIR}}, "\n";
264 chdir $dir or carp("Couldn't change to directory $dir: $!");
265 my $fh = new FileHandle;
266 $fh->open("Makefile.PL") or carp("Couldn't open Makefile.PL in $dir");
267 my $eval = join "", <$fh>;
270 warn "WARNING from evaluation of $dir/Makefile.PL: $@" if $@;
274 # sub ExtUtils::MakeMaker::full_setup ;
275 # sub ExtUtils::MakeMaker::attrib_help ;
276 # sub ExtUtils::MakeMaker::writeMakefile ;
277 # sub ExtUtils::MakeMaker::WriteMakefile ;
278 # sub ExtUtils::MakeMaker::new ;
279 # sub ExtUtils::MakeMaker::check_manifest ;
280 # sub ExtUtils::MakeMaker::parse_args ;
281 # sub ExtUtils::MakeMaker::check_hints ;
282 # sub ExtUtils::MakeMaker::mv_all_methods ;
283 # sub ExtUtils::MakeMaker::prompt ;
284 # sub ExtUtils::MakeMaker::help ;
285 # sub ExtUtils::MakeMaker::skipcheck ;
286 # sub ExtUtils::MakeMaker::flush ;
287 # sub ExtUtils::MakeMaker::mkbootstrap ;
288 # sub ExtUtils::MakeMaker::mksymlists ;
289 # sub ExtUtils::MakeMaker::neatvalue ;
290 # sub ExtUtils::MakeMaker::selfdocument ;
297 # We're done with inheritance setup. As we have two frequently called
298 # things: Check_Version() and mod_install(), we want to reduce startup
299 # time. Only WriteMakefile needs all the power here.
305 $SIG{__WARN__} = sub {
306 $_[0] =~ /^Use of uninitialized value/ && return;
307 $_[0] =~ /used only once/ && return;
308 $_[0] =~ /^Subroutine\s+[\w:]+\s+redefined/ && return;
314 post_initialize const_config constants const_loadlibs
315 const_cccmd tool_autosplit tool_xsubpp tools_other dist macro
316 depend post_constants pasthru c_o xs_c xs_o top_targets
317 linkext dlsyms dynamic dynamic_bs dynamic_lib static
318 static_lib installpm manifypods processPL installbin subdirs
319 clean realclean dist_basics dist_core dist_dir dist_test
320 dist_ci install force perldepend makefile staticmake test
321 postamble selfdocument
322 ); # loses section ordering
324 @MM_Sections{@MM_Sections} = {} x @MM_Sections;
326 # All sections are valid keys.
327 %Recognized_Att_Keys = %MM_Sections;
329 # we will use all these variables in the Makefile
332 ar cc cccdlflags ccdlflags dlext dlsrc ld lddlflags ldflags libc
333 lib_ext obj_ext ranlib sitelibexp sitearchexp so
337 foreach $item (split(/\n/,attrib_help())){
338 next unless $item =~ m/^=item\s+(\w+)\s*$/;
339 $Recognized_Att_Keys{$1} = $2;
340 print "Attribute '$1' => '$2'\n" if ($Verbose >= 2);
342 foreach $item (@Get_from_Config) {
343 $Recognized_Att_Keys{uc $item} = $Config{$item};
344 print "Attribute '\U$item\E' => '$Config{$item}'\n"
349 # When we pass these through to a Makefile.PL in a subdirectory, we prepend
350 # "..", so that all files to be installed end up below ./blib
354 INST_LIB 1 INST_ARCHLIB 1 INST_EXE 1 MAP_TARGET 1 INST_MAN1DIR 1 INST_MAN3DIR 1
355 PERL_SRC 1 PERL 1 FULLPERL 1
361 return $Attrib_Help if $Attrib_Help;
365 while ($line = <DATA>) {
366 $switch ||= $line =~ /^=item C\s*$/;
368 last if $line =~ /^=cut/;
372 $Attrib_Help = $help;
378 The extension you are trying to build apparently is rather old and
379 most probably outdated. We detect that from the fact, that a
380 subroutine "writeMakefile" is called, and this subroutine is not
381 supported anymore since about October 1994.
383 Please contact the author or look into CPAN (details about CPAN can be
384 found in the FAQ and at http:/www.perl.com) for a more recent version
385 of the extension. If you're really desperate, you can try to change
386 the subroutine name from writeMakefile to WriteMakefile and rerun
387 'perl Makefile.PL', but you're most probably left alone, when you do
396 Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
398 MM->new(\%att)->flush;
402 my($class,$self) = @_;
403 full_setup() unless $Setup_done++;
407 print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
408 if (-f "MANIFEST" && ! -f "Makefile"){
412 $self = {} unless (defined $self);
416 my(%initial_att) = %$self; # record initial attributes
418 if (defined $self->{CONFIGURE}) {
419 if (ref $self->{CONFIGURE} eq 'CODE') {
420 $self = { %$self, %{&{$self->{CONFIGURE}}}};
422 croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n";
426 # This is for old Makefiles written pre 5.00, will go away
427 if ( Carp::longmess("") =~ /runsubdirpl/s ){
428 #$self->{Correct_relativ_directories}++;
429 carp("WARNING: Please rerun 'perl Makefile.PL' to regenerate your Makefiles\n");
431 $self->{Correct_relativ_directories}=0;
434 my $class = ++$PACKNAME;
437 print "Blessing Object into class [$class]\n" if $Verbose>=2;
438 mv_all_methods("MY",$class);
441 @{"$class\:\:ISA"} = 'MM';
444 if (defined $Parent[-2]){
445 $self->{PARENT} = $Parent[-2];
447 for $key (keys %Prepend_dot_dot) {
448 next unless defined $self->{PARENT}{$key};
449 $self->{$key} = $self->{PARENT}{$key};
450 $self->{$key} = $self->catdir("..",$self->{$key})
451 unless $self->{$key} =~ m!^/!;
453 $self->{PARENT}->{CHILDREN}->{$class} = $self if $self->{PARENT};
455 parse_args($self,@ARGV);
458 $self->{NAME} ||= $self->guess_name;
460 ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
464 if (! $self->{PERL_SRC} ) {
465 my($pthinks) = $INC{'Config.pm'};
466 $pthinks = vmsify($pthinks) if $Is_VMS;
467 if ($pthinks ne $self->catfile($Config{archlibexp},'Config.pm')){
468 $pthinks =~ s!/Config\.pm$!!;
471 Your perl and your Config.pm seem to have different ideas about the architecture
473 Perl thinks: [$pthinks]
474 Config says: [$Config{archname}]
475 This may or may not cause problems. Please check your installation of perl if you
476 have problems building this extension.
481 $self->init_dirscan();
482 $self->init_others();
484 push @{$self->{RESULT}}, <<END;
485 # This Makefile is for the $self->{NAME} extension to perl.
487 # It was generated automatically by MakeMaker version
488 # $VERSION (Revision: $Revision) from the contents of
489 # Makefile.PL. Don't edit this file, edit Makefile.PL instead.
491 # ANY CHANGES MADE HERE WILL BE LOST!
493 # MakeMaker Parameters:
496 foreach $key (sort keys %initial_att){
497 my($v) = neatvalue($initial_att{$key});
498 $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
500 push @{$self->{RESULT}}, "# $key => $v";
503 # turn the SKIP array into a SKIPHASH hash
505 for $skip (@{$self->{SKIP} || []}) {
506 $self->{SKIPHASH}{$skip} = 1;
509 # We run all the subdirectories now. They don't have much to query
510 # from the parent, but the parent has to query them: if they need linking!
511 unless ($self->{NORECURS}) {
512 $self->eval_in_subdirs if @{$self->{DIR}};
515 tie %::att, ExtUtils::MakeMaker::TieAtt, $self;
517 foreach $section ( @MM_Sections ){
518 print "Processing Makefile '$section' section\n" if ($Verbose >= 2);
519 my($skipit) = $self->skipcheck($section);
521 push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit.";
523 my(%a) = %{$self->{$section} || {}};
524 push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
525 push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
526 push @{$self->{RESULT}}, $self->nicetext($self->$section( %a ));
530 push @{$self->{RESULT}}, "\n# End.";
537 print STDOUT "Checking if your kit is complete...\n";
538 $ExtUtils::Manifest::Quiet=$ExtUtils::Manifest::Quiet=1; #avoid warning
539 my(@missed)=ExtUtils::Manifest::manicheck();
541 print STDOUT "Warning: the following files are missing in your kit:\n";
542 print "\t", join "\n\t", @missed;
544 print STDOUT "Please inform the author.\n";
546 print STDOUT "Looks good\n";
551 my($self, @args) = @_;
553 unless (m/(.*?)=(.*)/){
554 help(),exit 1 if m/^help$/;
555 ++$Verbose if m/^verb/;
558 my($name, $value) = ($1, $2);
559 if ($value =~ m/^~(\w+)?/){ # tilde with optional username
560 $value =~ s [^~(\w*)]
562 ((getpwnam($1))[7] || "~$1") :
566 # This may go away, in mid 1996
567 if ($self->{Correct_relativ_directories}){
568 $value = $self->catdir("..",$value)
569 if $Prepend_dot_dot{$name} && ! $value =~ m!^/!;
571 $self->{$name} = $value;
573 # This may go away, in mid 1996
574 delete $self->{Correct_relativ_directories};
576 # catch old-style 'potential_libs' and inform user how to 'upgrade'
577 if (defined $self->{potential_libs}){
578 my($msg)="'potential_libs' => '$self->{potential_libs}' should be";
579 if ($self->{potential_libs}){
580 print STDOUT "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n";
582 print STDOUT "$msg deleted.\n";
584 $self->{LIBS} = [$self->{potential_libs}];
585 delete $self->{potential_libs};
587 # catch old-style 'ARMAYBE' and inform user how to 'upgrade'
588 if (defined $self->{ARMAYBE}){
589 my($armaybe) = $self->{ARMAYBE};
590 print STDOUT "ARMAYBE => '$armaybe' should be changed to:\n",
591 "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n";
592 my(%dl) = %{$self->{dynamic_lib} || {}};
593 $self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe};
594 delete $self->{ARMAYBE};
596 if (defined $self->{LDTARGET}){
597 print STDOUT "LDTARGET should be changed to LDFROM\n";
598 $self->{LDFROM} = $self->{LDTARGET};
599 delete $self->{LDTARGET};
601 # Turn a DIR argument on the command line into an array
602 if (defined $self->{DIR} && ref \$self->{DIR} eq 'SCALAR') {
603 # So they can choose from the command line, which extensions they want
604 # the grep enables them to have some colons too much in case they
605 # have to build a list with the shell
606 $self->{DIR} = [grep $_, split ":", $self->{DIR}];
609 foreach $mmkey (sort keys %$self){
610 print STDOUT " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose;
611 print STDOUT "'$mmkey' is not a known MakeMaker parameter name.\n"
612 unless exists $Recognized_Att_Keys{$mmkey};
618 # We allow extension-specific hints files.
620 return unless -d "hints";
622 # First we look for the best hintsfile we have
624 my($hint)="$Config{osname}_$Config{osvers}";
629 # Also try without trailing minor version numbers.
631 last if -f "hints/$hint.pl"; # found
633 last unless $hint =~ s/_[^_]*$//; # nothing to cut off
635 return unless -f "hints/$hint.pl"; # really there
637 # execute the hintsfile:
638 my $fh = new FileHandle;
639 $fh->open("hints/$hint.pl");
642 print STDOUT "Processing hints file hints/$hint.pl\n";
643 eval join('',@goodhints);
644 print STDOUT $@ if $@;
650 my($symtab) = \%{"${from}::"};
653 # Here you see the *current* list of methods that are overridable
654 # from Makefile.PL via MY:: subroutines. As of VERSION 5.07 I'm
655 # still trying to reduce the list to some reasonable minimum --
656 # because I want to make it easier for the user. A.K.
658 foreach $method (@MM_Sections, qw[ dir_target
659 fileparse fileparse_set_fstype installpm_x libscan makeaperl
660 mksymlists needs_linking subdir_x test_via_harness
661 test_via_script writedoc ]) {
663 # We cannot say "next" here. Nick might call MY->makeaperl
664 # which isn't defined right now
666 # next unless defined &{"${from}::$method"};
668 *{"${to}::$method"} = \&{"${from}::$method"};
670 # delete would do, if we were sure, nobody ever called
671 # MY->makeaperl directly
673 # delete $symtab->{$method};
675 # If we delete a method, then it will be undefined and cannot
676 # be called. But as long as we have Makefile.PLs that rely on
677 # %MY:: being intact, we have to fill the hole with an
680 eval "package MY; sub $method {local *$method; shift->MY::$method(\@_); }";
684 # We have to clean out %INC also, because the current directory is
685 # changed frequently and Graham Barr prefers to get his version
686 # out of a History.pl file which is "required" so woudn't get
687 # loaded again in another extension requiring a History.pl
690 foreach $inc (keys %INC) {
691 next if $NORMAL_INC{$inc};
692 #warn "***$inc*** deleted";
700 BEGIN { $ISA_TTY = -t STDIN && -t STDOUT }
701 Carp::confess("prompt function called without an argument") unless defined $mess;
702 $def = "" unless defined $def;
703 my $dispdef = "[$def] ";
707 print "$mess $dispdef";
708 chop($ans = <STDIN>);
710 return $ans if defined $ans;
714 sub help {print &attrib_help, "\n";}
719 if ($section eq 'dynamic') {
720 print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
721 "in skipped section 'dynamic_bs'\n"
722 if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
723 print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
724 "in skipped section 'dynamic_lib'\n"
725 if $self->{SKIPHASH}{dynamic_lib} && $Verbose;
727 if ($section eq 'dynamic_lib') {
728 print STDOUT "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ",
729 "targets in skipped section 'dynamic_bs'\n"
730 if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
732 if ($section eq 'static') {
733 print STDOUT "Warning (non-fatal): Target 'static' depends on targets ",
734 "in skipped section 'static_lib'\n"
735 if $self->{SKIPHASH}{static_lib} && $Verbose;
737 return 'skipped' if $self->{SKIPHASH}{$section};
744 my $fh = new FileHandle;
745 print STDOUT "Writing $self->{MAKEFILE} for $self->{NAME}\n";
747 unlink($self->{MAKEFILE}, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : '');
748 $fh->open(">MakeMaker.tmp") or die "Unable to open MakeMaker.tmp: $!";
750 for $chunk (@{$self->{RESULT}}) {
751 print $fh "$chunk\n";
755 my($finalname) = $self->{MAKEFILE};
756 rename("MakeMaker.tmp", $finalname);
757 chmod 0644, $finalname unless $Is_VMS;
758 system("$Config::Config{eunicefix} $finalname") unless $Config::Config{eunicefix} eq ":";
761 # The following mkbootstrap() is only for installations that are calling
762 # the pre-4.1 mkbootstrap() from their old Makefiles. This MakeMaker
763 # writes Makefiles, that use ExtUtils::Mkbootstrap directly.
766 !!! Your Makefile has been built such a long time ago, !!!
767 !!! that is unlikely to work with current MakeMaker. !!!
768 !!! Please rebuild your Makefile !!!
772 # Ditto for mksymlists() as of MakeMaker 5.17
775 !!! Your Makefile has been built such a long time ago, !!!
776 !!! that is unlikely to work with current MakeMaker. !!!
777 !!! Please rebuild your Makefile !!!
783 return "undef" unless defined $v;
785 return "q[$v]" unless $t;
787 my(@m, $elem, @neat);
789 foreach $elem (@$v) {
790 push @neat, "q[$elem]";
792 push @m, join ", ", @neat;
796 return "$v" unless $t eq 'HASH';
798 push(@m,"$key=>".neatvalue($val)) while (($key,$val) = each %$v);
799 return "{ ".join(', ',@m)." }";
806 push @m, "\n# Full list of MakeMaker attribute values:";
807 foreach $key (sort keys %$self){
808 next if $key eq 'RESULT' || $key =~ /^[A-Z][a-z]/;
809 my($v) = neatvalue($self->{$key});
810 $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
812 push @m, "# $key => $v";
818 package ExtUtils::MakeMaker;
821 # Without selfLoader we need
825 # For SelfLoader we need
831 ExtUtils::MakeMaker - create an extension Makefile
835 C<use ExtUtils::MakeMaker;>
837 C<WriteMakefile( ATTRIBUTE =E<gt> VALUE [, ...] );>
841 C<MM-E<gt>new(\%att)-E<gt>flush;>
845 This utility is designed to write a Makefile for an extension module
846 from a Makefile.PL. It is based on the Makefile.SH model provided by
847 Andy Dougherty and the perl5-porters.
849 It splits the task of generating the Makefile into several subroutines
850 that can be individually overridden. Each subroutine returns the text
851 it wishes to have written to the Makefile.
853 =head2 Hintsfile support
855 MakeMaker.pm uses the architecture specific information from
856 Config.pm. In addition it evaluates architecture specific hints files
857 in a C<hints/> directory. The hints files are expected to be named
858 like their counterparts in C<PERL_SRC/hints>, but with an C<.pl> file
859 name extension (eg. C<next_3_2.pl>). They are simply C<eval>ed by
860 MakeMaker within the WriteMakefile() subroutine, and can be used to
861 execute commands as well as to include special variables. The rules
862 which hintsfile is chosen are the same as in Configure.
864 The hintsfile is eval()ed immediately after the arguments given to
865 WriteMakefile are stuffed into a hash reference $self but before this
866 reference becomes blessed. So if you want to do the equivalent to
867 override or create an attribute you would say something like
869 $self->{LIBS} = ['-ldbm -lucb -lc'];
871 =head2 What's new in version 5 of MakeMaker
873 MakeMaker 5 is pure object oriented. This allows us to write an
874 unlimited number of Makefiles with a single perl process. 'perl
875 Makefile.PL' with MakeMaker 5 goes through all subdirectories
876 immediately and evaluates any Makefile.PL found in the next level
877 subdirectories. The benefit of this approach comes in useful for both
878 single and multi directories extensions.
880 Multi directory extensions have an immediately visible speed
881 advantage, because there's no startup penalty for any single
882 subdirectory Makefile.
884 Single directory packages benefit from the much improved
885 needs_linking() method. As the main Makefile knows everything about
886 the subdirectories, a needs_linking() method can now query all
887 subdirectories if there is any linking involved down in the tree. The
888 speedup for PM-only Makefiles seems to be around 1 second on my
891 =head2 Incompatibilities between MakeMaker 5.00 and 4.23
893 There are no incompatibilities in the short term, as all changes are
894 accompanied by short-term workarounds that guarantee full backwards
897 You are likely to face a few warnings that expose deprecations which
898 will result in incompatibilities in the long run:
900 You should not use %att directly anymore. Instead any subroutine you
901 override in the MY package will be called by the object method, so you
902 can access all object attributes directly via the object in $_[0].
904 You should not call the class methos MM->something anymore. Instead
905 you should call the superclass. Something like
909 $self->MM::constants();
912 Especially the libscan() and exescan() methods should be altered
913 towards OO programming, that means do not expect that $_ to contain
914 the path but rather $_[1].
916 Try to build several extensions simultanously to debug your
917 Makefile.PL. You can unpack a bunch of distributed packages within one
920 perl -MExtUtils::MakeMaker -e 'WriteMakefile()'
922 That's actually fun to watch :)
924 Final suggestion: Try to delete all of your MY:: subroutines and
925 watch, if you really still need them. MakeMaker might already do what
926 you want without them. That's all about it.
929 =head2 Default Makefile Behaviour
931 The automatically generated Makefile enables the user of the extension
934 perl Makefile.PL # optionally "perl Makefile.PL verbose"
936 make test # optionally set TEST_VERBOSE=1
937 make install # See below
939 The Makefile to be produced may be altered by adding arguments of the
940 form C<KEY=VALUE>. E.g.
942 perl Makefile.PL PREFIX=/tmp/myperl5
944 Other interesting targets in the generated Makefile are
946 make config # to check if the Makefile is up-to-date
947 make clean # delete local temp files (Makefile gets renamed)
948 make realclean # delete derived files (including ./blib)
949 make ci # check in all the files in the MANIFEST file
950 make dist # see below the Distribution Support section
954 MakeMaker checks for the existence of a file named "test.pl" in the
955 current directory and if it exists it adds commands to the test target
956 of the generated Makefile that will execute the script with the proper
957 set of perl C<-I> options.
959 MakeMaker also checks for any files matching glob("t/*.t"). It will
960 add commands to the test target of the generated Makefile that execute
961 all matching files via the L<Test::Harness> module with the C<-I>
962 switches set correctly.
966 make alone puts all relevant files into directories that are named by
967 the macros INST_LIB, INST_ARCHLIB, INST_EXE, INST_MAN1DIR, and
968 INST_MAN3DIR. All these default to something below ./blib if
969 you are I<not> building below the perl source directory. If you I<are>
970 building below the perl source, INST_LIB and INST_ARCHLIB default to
971 ../../lib, and INST_EXE is not defined.
973 The I<install> target of the generated Makefile copies the files found
974 below each of the INST_* directories to their INSTALL*
975 counterparts. Which counterparts are chosen depends on the setting of
976 INSTALLDIRS according to the following table:
981 INST_LIB INSTALLPRIVLIB INSTALLSITELIB
982 INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH
984 INST_MAN1DIR INSTALLMAN1DIR
985 INST_MAN3DIR INSTALLMAN3DIR
987 The INSTALL... macros in turn default to their %Config
988 ($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts.
990 If you don't want to keep the defaults, MakeMaker helps you to
991 minimize the typing needed: the usual relationship between
992 INSTALLPRIVLIB and INSTALLARCHLIB is determined by Configure at perl
993 compilation time. MakeMaker supports the user who sets
994 INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not, then
995 MakeMaker defaults the latter to be the same subdirectory of
996 INSTALLPRIVLIB as Configure decided for the counterparts in %Config ,
997 otherwise it defaults to INSTALLPRIVLIB. The same relationship holds
998 for INSTALLSITELIB and INSTALLSITEARCH.
1000 MakeMaker gives you much more freedom than needed to configure
1001 internal variables and get different results. It is worth to mention,
1002 that make(1) also lets you configure most of the variables that are
1003 used in the Makefile. But in the majority of situations this will not
1004 be necessary, and should only be done, if the author of a package
1008 =head2 PREFIX attribute
1010 The PREFIX attribute can be used to set the INSTALL* attributes in one
1011 go. The quickest way to install a module in a non-standard place
1013 perl Makefile.PL PREFIX=~
1015 This will replace the string specified by $Config{prefix} in all
1016 $Config{install*} values.
1018 Note, that the tilde expansion is done by MakeMaker, not by perl by
1019 default, nor by make.
1021 If the user has superuser privileges, and is not working on AFS
1022 (Andrew File System) or relatives, then the defaults for
1023 INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLBIN, etc. will be appropriate,
1024 and this incantation will be the best:
1026 perl Makefile.PL; make; make test
1029 make install per default writes some documentation of what has been
1030 done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This feature
1031 can be bypassed by calling make pure_install.
1035 will have to specify the installation directories as these most
1036 probably have changed since perl itself has been installed. They will
1037 have to do this by calling
1039 perl Makefile.PL INSTALLSITELIB=/afs/here/today \
1040 INSTALLBIN=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages
1043 Be careful to repeat this procedure every time you recompile an
1044 extension, unless you are sure the AFS installation directories are
1047 =head2 Static Linking of a new Perl Binary
1049 An extension that is built with the above steps is ready to use on
1050 systems supporting dynamic loading. On systems that do not support
1051 dynamic loading, any newly created extension has to be linked together
1052 with the available resources. MakeMaker supports the linking process
1053 by creating appropriate targets in the Makefile whenever an extension
1054 is built. You can invoke the corresponding section of the makefile with
1058 That produces a new perl binary in the current directory with all
1059 extensions linked in that can be found in INST_ARCHLIB , SITELIBEXP,
1060 and PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on
1061 UNIX, this is called Makefile.aperl (may be system dependent). If you
1062 want to force the creation of a new perl, it is recommended, that you
1063 delete this Makefile.aperl, so the directories are searched-through
1064 for linkable libraries again.
1066 The binary can be installed into the directory where perl normally
1067 resides on your machine with
1071 To produce a perl binary with a different name than C<perl>, either say
1073 perl Makefile.PL MAP_TARGET=myperl
1080 make myperl MAP_TARGET=myperl
1081 make inst_perl MAP_TARGET=myperl
1083 In any case you will be prompted with the correct invocation of the
1084 C<inst_perl> target that installs the new binary into INSTALLBIN.
1086 make inst_perl per default writes some documentation of what has been
1087 done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This
1088 can be bypassed by calling make pure_inst_perl.
1090 Warning: the inst_perl: target will most probably overwrite your
1091 existing perl binary. Use with care!
1093 Sometimes you might want to build a statically linked perl although
1094 your system supports dynamic loading. In this case you may explicitly
1095 set the linktype with the invocation of the Makefile.PL or make:
1097 perl Makefile.PL LINKTYPE=static # recommended
1101 make LINKTYPE=static # works on most systems
1103 =head2 Determination of Perl Library and Installation Locations
1105 MakeMaker needs to know, or to guess, where certain things are
1106 located. Especially INST_LIB and INST_ARCHLIB (where to put the files
1107 during the make(1) run), PERL_LIB and PERL_ARCHLIB (where to read
1108 existing modules from), and PERL_INC (header files and C<libperl*.*>).
1110 Extensions may be built either using the contents of the perl source
1111 directory tree or from the installed perl library. The recommended way
1112 is to build extensions after you have run 'make install' on perl
1113 itself. You can do that in any directory on your hard disk that is not
1114 below the perl source tree. The support for extensions below the ext
1115 directory of the perl distribution is only good for the standard
1116 extensions that come with perl.
1118 If an extension is being built below the C<ext/> directory of the perl
1119 source then MakeMaker will set PERL_SRC automatically (e.g.,
1120 C<../..>). If PERL_SRC is defined and the extension is recognized as
1121 a standard extension, then other variables default to the following:
1124 PERL_LIB = PERL_SRC/lib
1125 PERL_ARCHLIB = PERL_SRC/lib
1127 INST_ARCHLIB = PERL_ARCHLIB
1129 If an extension is being built away from the perl source then MakeMaker
1130 will leave PERL_SRC undefined and default to using the installed copy
1131 of the perl library. The other variables default to the following:
1133 PERL_INC = $archlibexp/CORE
1134 PERL_LIB = $privlibexp
1135 PERL_ARCHLIB = $archlibexp
1136 INST_LIB = ./blib/lib
1137 INST_ARCHLIB = ./blib/arch
1139 If perl has not yet been installed then PERL_SRC can be defined on the
1140 command line as shown in the previous section.
1142 =head2 Useful Default Makefile Macros
1144 FULLEXT = Pathname for extension directory (eg DBD/Oracle).
1146 BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
1148 ROOTEXT = Directory part of FULLEXT with leading slash (eg /DBD)
1150 INST_LIBDIR = C<$(INST_LIB)$(ROOTEXT)>
1152 INST_AUTODIR = C<$(INST_LIB)/auto/$(FULLEXT)>
1154 INST_ARCHAUTODIR = C<$(INST_ARCHLIB)/auto/$(FULLEXT)>
1156 =head2 Using Attributes and Parameters
1158 The following attributes can be specified as arguments to WriteMakefile()
1159 or as NAME=VALUE pairs on the command line:
1163 # The following "=item C" is used by the attrib_help routine
1164 # likewise the "=back" below. So be careful when changing it!
1170 Ref to array of *.c file names. Initialised from a directory scan
1171 and the values portion of the XS attribute hash. This is not
1172 currently used by MakeMaker but may be handy in Makefile.PLs.
1176 Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from
1177 config.sh. MakeMaker will add to CONFIG the following values anyway:
1197 CODE reference. The subroutine should return a hash reference. The
1198 hash may contain further attributes, e.g. {LIBS => ...}, that have to
1199 be determined by some evaluation method.
1203 Something like C<"-DHAVE_UNISTD_H">
1207 Ref to array of subdirectories containing Makefile.PLs e.g. [ 'sdbm'
1212 Your name for distributing the package (by tar file). This defaults to
1217 Hashref of symbol names for routines to be made available as
1218 universal symbols. Each key/value pair consists of the package name
1219 and an array of routine names in that package. Used only under AIX
1220 (export lists) and VMS (linker options) at present. The routine
1221 names supplied will be expanded in the same way as XSUB names are
1222 expanded by the XS() macro. Defaults to
1224 {"$(NAME)" => ["boot_$(NAME)" ] }
1228 {"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
1229 "NetconfigPtr" => [ 'DESTROY'] }
1233 Array of symbol names for variables to be made available as
1234 universal symbols. Used only under AIX (export lists) and VMS
1235 (linker options) at present. Defaults to []. (e.g. [ qw(
1236 Foo_version Foo_numstreams Foo_tree ) ])
1240 Ref to array of executable files. The files will be copied to the
1241 INST_EXE directory. Make realclean will delete them from there
1244 =item FIRST_MAKEFILE
1246 The name of the Makefile to be produced. Defaults to the contents of
1247 MAKEFILE, but can be overridden. This is used for the second Makefile
1248 that will be produced for the MAP_TARGET.
1252 Perl binary able to run this extension.
1256 Ref to array of *.h file names. Similar to C.
1260 Include file dirs eg: C<"-I/usr/5include -I/path/to/inc">
1262 =item INSTALLARCHLIB
1264 Used by 'make install', which copies files from INST_ARCHLIB to this
1265 directory if INSTALLDIRS is set to perl.
1269 Used by 'make install' which copies files from INST_EXE to this
1274 Determines which of the two sets of installation directories to
1275 choose: installprivlib and installarchlib versus installsitelib and
1276 installsitearch. The first pair is chosen with INSTALLDIRS=perl, the
1277 second with INSTALLDIRS=site. Default is site.
1279 =item INSTALLMAN1DIR
1281 This directory gets the man pages at 'make install' time. Defaults to
1282 $Config{installman1dir}.
1284 =item INSTALLMAN3DIR
1286 This directory gets the man pages at 'make install' time. Defaults to
1287 $Config{installman3dir}.
1289 =item INSTALLPRIVLIB
1291 Used by 'make install', which copies files from INST_LIB to this
1292 directory if INSTALLDIRS is set to perl.
1294 =item INSTALLSITELIB
1296 Used by 'make install', which copies files from INST_LIB to this
1297 directory if INSTALLDIRS is set to site (default).
1299 =item INSTALLSITEARCH
1301 Used by 'make install', which copies files from INST_ARCHLIB to this
1302 directory if INSTALLDIRS is set to site (default).
1306 Same as INST_LIB for architecture dependent files.
1310 Directory, where executable scripts should be installed during
1311 'make'. Defaults to "./blib/bin", just to have a dummy location during
1312 testing. make install will copy the files in INST_EXE to INSTALLBIN.
1316 Directory where we put library files of this extension while building
1321 Directory to hold the man pages at 'make' time
1325 Directory to hold the man pages at 'make' time
1329 defaults to "$(OBJECT)" and is used in the ld command to specify
1330 what files to link/load from (also see dynamic_lib below for how to
1335 The filename of the perllibrary that will be used together with this
1336 extension. Defaults to libperl.a.
1340 An anonymous array of alternative library
1341 specifications to be searched for (in order) until
1342 at least one library is found. E.g.
1344 'LIBS' => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"]
1346 Mind, that any element of the array
1347 contains a complete set of arguments for the ld
1348 command. So do not specify
1350 'LIBS' => ["-ltcl", "-ltk", "-lX11"]
1352 See ODBM_File/Makefile.PL for an example, where an array is needed. If
1353 you specify a scalar as in
1355 'LIBS' => "-ltcl -ltk -lX11"
1357 MakeMaker will turn it into an array with one element.
1361 'static' or 'dynamic' (default unless usedl=undef in
1362 config.sh). Should only be used to force static linking (also see
1367 Boolean which tells MakeMaker, that it should include the rules to
1368 make a perl. This is handled automatically as a switch by
1369 MakeMaker. The user normally does not need it.
1373 The name of the Makefile to be produced.
1377 Hashref of pod-containing files. MakeMaker will default this to all
1378 EXE_FILES files that include POD directives. The files listed
1379 here will be converted to man pages and installed as was requested
1384 Hashref of .pm and .pod files. MakeMaker will default this to all
1385 .pod and any .pm files that include POD directives. The files listed
1386 here will be converted to man pages and installed as was requested
1391 If it is intended, that a new perl binary be produced, this variable
1392 may hold a name for that binary. Defaults to perl
1396 If the extension links to a library that it builds set this to the
1397 name of the library (see SDBM_File)
1401 Perl module name for this extension (DBD::Oracle). This will default
1402 to the directory name but should be explicitly defined in the
1407 MakeMaker will figure out, if an extension contains linkable code
1408 anywhere down the directory tree, and will set this variable
1409 accordingly, but you can speed it up a very little bit, if you define
1410 this boolean variable yourself.
1414 Defaults the C<@>. By setting it to an empty string you can generate a
1415 Makefile that echos all commands. Mainly used in debugging MakeMaker
1420 Boolean. Attribute to inhibit descending into subdirectories.
1424 List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long
1425 string containing all object files, e.g. "tkpBind.o
1426 tkpButton.o tkpCanvas.o"
1430 Perl binary for tasks that can be done by miniperl
1434 The call to the program that is able to compile perlmain.c. Defaults
1439 Same as above for architecture dependent files
1443 Directory containing the Perl library to use.
1447 Directory containing the Perl source code (use of this should be
1448 avoided, it may be undefined)
1452 Ref to hash of files to be processed as perl programs. MakeMaker
1453 will default to any found *.PL file (except Makefile.PL) being keys
1454 and the basename of the file being the value. E.g.
1456 {'foobar.PL' => 'foobar'}
1458 The *.PL files are expected to produce output to the target files
1463 Hashref of .pm files and *.pl files to be installed. e.g.
1465 {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}
1467 By default this will include *.pm and *.pl. If a lib directory
1468 exists and is not listed in DIR (above) then any *.pm and *.pl files
1469 it contains will also be included by default. Defining PM in the
1470 Makefile.PL will override PMLIBDIRS.
1474 Ref to array of subdirectories containing library files. Defaults to
1475 [ 'lib', $(BASEEXT) ]. The directories will be scanned and any files
1476 they contain will be installed in the corresponding location in the
1477 library. A libscan() method can be used to alter the behaviour.
1478 Defining PM in the Makefile.PL will override PMLIBDIRS.
1482 Can be used to set the three INSTALL* attributes in one go (except for
1483 probably INSTALLMAN1DIR, if it is not below PREFIX according to
1484 %Config). They will have PREFIX as a common directory node and will
1485 branch from that node into lib/, lib/ARCHNAME or whatever Configure
1486 decided at the build time of your perl (unless you override one of
1491 Placeholder, not yet implemented. Will eventually be a hashref: Names
1492 of modules that need to be available to run this extension (e.g. Fcntl
1493 for SDBM_File) are the keys of the hash and the desired version is the
1494 value. Needs further evaluation, should probably allow to define
1495 prerequisites among header files, libraries, perl version, etc.
1499 Arryref. E.g. [qw(name1 name2)] skip (do not write) sections of the
1504 Ref to array of typemap file names. Use this when the typemaps are
1505 in some directory other than the current directory or when they are
1506 not named B<typemap>. The last typemap in the list takes
1507 precedence. A typemap in the current directory has highest
1508 precedence, even if it isn't listed in TYPEMAPS. The default system
1509 typemap has lowest precedence.
1513 Your version number for distributing the package. This defaults to
1518 Instead of specifying the VERSION in the Makefile.PL you can let
1519 MakeMaker parse a file to determine the version number. The parsing
1520 routine requires that the file named by VERSION_FROM contains one
1521 single line to compute the version number. The first line in the file
1522 that contains the regular expression
1524 /(\$[\w:]*\bVERSION)\b.*=/
1526 will be evaluated with eval() and the value of the named variable
1527 B<after> the eval() will be assigned to the VERSION attribute of the
1528 MakeMaker object. The following lines will be parsed o.k.:
1531 ( $VERSION ) = '$Revision: 1.174 $ ' =~ /\$Revision:\s+([^\s]+)/;
1532 $FOO::VERSION = '1.10';
1534 but these will fail:
1536 my $VERSION = '1.01';
1537 local $VERSION = '1.02';
1538 local $FOO::VERSION = '1.30';
1540 The file named in VERSION_FROM is added as a dependency to Makefile to
1541 guarantee, that the Makefile contains the correct VERSION macro after
1542 a change of the file.
1546 Hashref of .xs files. MakeMaker will default this. e.g.
1548 {'name_of_file.xs' => 'name_of_file.c'}
1550 The .c files will automatically be included in the list of files
1551 deleted by a make clean.
1555 String of options to pass to xsubpp. This might include C<-C++> or
1556 C<-extern>. Do not include typemaps here; the TYPEMAP parameter exists for
1561 May be set to an empty string, which is identical to C<-prototypes>, or
1562 C<-noprototypes>. See the xsubpp documentation for details. MakeMaker
1563 defaults to the empty string.
1567 Your version number for the .xs file of this package. This defaults
1568 to the value of the VERSION attribute.
1572 =head2 Additional lowercase attributes
1574 can be used to pass parameters to the methods which implement that
1575 part of the Makefile. These are not normally required:
1581 {FILES => "*.xyz foo"}
1585 {ANY_TARGET => ANY_DEPENDECY, ...}
1589 {TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => 'gz',
1590 SHAR => 'shar -m', DIST_CP => 'ln'}
1592 If you specify COMPRESS, then SUFFIX should also be altered, as it is
1593 needed to tell make the target file of the compression. Setting
1594 DIST_CP to ln can be useful, if you need to preserve the timestamps on
1595 your files. DIST_CP can take the values 'cp', which copies the file,
1596 'ln', which links the file, and 'best' which copies symbolic links and
1597 links the rest. Default is 'best'.
1601 {ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'}
1605 {SPLITLIB => '$(INST_LIB)' (default) or '$(INST_ARCHLIB)'}
1609 {LINKTYPE => 'static', 'dynamic' or ''}
1611 NB: Extensions that have nothing but *.pm files had to say
1615 with Pre-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line
1616 can be deleted safely. MakeMaker recognizes, when there's nothing to
1621 {ANY_MACRO => ANY_VALUE, ...}
1625 {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
1627 =item tool_autosplit
1635 # bug in pod2html, so leave the =back
1637 # Don't delete this cut, MM depends on it!
1639 =head2 Overriding MakeMaker Methods
1641 If you cannot achieve the desired Makefile behaviour by specifying
1642 attributes you may define private subroutines in the Makefile.PL.
1643 Each subroutines returns the text it wishes to have written to
1644 the Makefile. To override a section of the Makefile you can
1647 sub MY::c_o { "new literal text" }
1649 or you can edit the default by saying something like:
1655 s/old text/new text/;
1659 Both methods above are available for backwards compatibility with
1662 If you still need a different solution, try to develop another
1663 subroutine, that fits your needs and submit the diffs to
1664 F<perl5-porters@nicoh.com> or F<comp.lang.perl.misc> as appropriate.
1666 =head2 Distribution Support
1668 For authors of extensions MakeMaker provides several Makefile
1669 targets. Most of the support comes from the ExtUtils::Manifest module,
1670 where additional documentation can be found.
1674 =item make distcheck
1676 reports which files are below the build directory but not in the
1677 MANIFEST file and vice versa. (See ExtUtils::Manifest::fullcheck() for
1680 =item make skipcheck
1682 reports which files are skipped due to the entries in the
1683 C<MANIFEST.SKIP> file (See ExtUtils::Manifest::skipcheck() for
1686 =item make distclean
1688 does a realclean first and then the distcheck. Note that this is not
1689 needed to build a new distribution as long as you are sure, that the
1690 MANIFEST file is ok.
1694 rewrites the MANIFEST file, adding all remaining files found (See
1695 ExtUtils::Manifest::mkmanifest() for details)
1699 Copies all the files that are in the MANIFEST file to a newly created
1700 directory with the name C<$(DISTNAME)-$(VERSION)>. If that directory
1701 exists, it will be removed first.
1705 Makes a distdir first, and runs a C<perl Makefile.PL>, a make, and
1706 a make test in that directory.
1710 First does a command $(PREOP) which defaults to a null command. Does a
1711 distdir next and runs C<tar> on that directory into a tarfile. Then
1712 deletes the distdir. Finishes with a command $(POSTOP) which defaults
1717 Defaults to $(DIST_DEFAULT) which in turn defaults to tardist.
1719 =item make uutardist
1721 Runs a tardist first and uuencodes the tarfile.
1725 First does a command $(PREOP) which defaults to a null command. Does a
1726 distdir next and runs C<shar> on that directory into a sharfile. Then
1727 deletes the distdir. Finishes with a command $(POSTOP) which defaults
1728 to a null command. Note: For shdist to work properly a C<shar>
1729 program that can handle directories is mandatory.
1733 Does a $(CI) and a $(RCS_LABEL) on all files in the MANIFEST file.
1737 Customization of the dist targets can be done by specifying a hash
1738 reference to the dist attribute of the WriteMakefile call. The
1739 following parameters are recognized:
1742 COMPRESS ('compress')
1745 RCS_LABEL ('rcs -q -Nv$(VERSION_SYM):')
1753 WriteMakefile( 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" })
1758 Andy Dougherty F<E<lt>doughera@lafcol.lafayette.eduE<gt>>, Andreas
1759 KE<ouml>nig F<E<lt>A.Koenig@franz.ww.TU-Berlin.DEE<gt>>, Tim Bunce
1760 F<E<lt>Tim.Bunce@ig.co.ukE<gt>>. VMS support by Charles Bailey
1761 F<E<lt>bailey@HMIVAX.HUMGEN.UPENN.EDUE<gt>>. OS/2 support by Ilya
1762 Zakharevich F<E<lt>ilya@math.ohio-state.eduE<gt>>. Contact the
1763 makemaker mailing list C<mailto:makemaker@franz.ww.tu-berlin.de>, if
1764 you have any questions.
1766 =head1 MODIFICATION HISTORY
1768 For a more complete documentation see the file Changes in the
1769 MakeMaker distribution package.
1773 See the file Todo in the MakeMaker distribution package.