1# $Id$ 2package ExtUtils::MakeMaker; 3 4use strict; 5 6BEGIN {require 5.006;} 7 8require Exporter; 9use ExtUtils::MakeMaker::Config; 10use Carp (); 11use File::Path; 12 13our $Verbose = 0; # exported 14our @Parent; # needs to be localized 15our @Get_from_Config; # referenced by MM_Unix 16our @MM_Sections; 17our @Overridable; 18my @Prepend_parent; 19my %Recognized_Att_Keys; 20 21our $VERSION = '6.56'; 22 23# Emulate something resembling CVS $Revision$ 24(our $Revision = $VERSION) =~ s{_}{}; 25$Revision = int $Revision * 10000; 26 27our $Filename = __FILE__; # referenced outside MakeMaker 28 29our @ISA = qw(Exporter); 30our @EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt); 31our @EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists 32 &WriteEmptyMakefile); 33 34# These will go away once the last of the Win32 & VMS specific code is 35# purged. 36my $Is_VMS = $^O eq 'VMS'; 37my $Is_Win32 = $^O eq 'MSWin32'; 38 39full_setup(); 40 41require ExtUtils::MM; # Things like CPAN assume loading ExtUtils::MakeMaker 42 # will give them MM. 43 44require ExtUtils::MY; # XXX pre-5.8 versions of ExtUtils::Embed expect 45 # loading ExtUtils::MakeMaker will give them MY. 46 # This will go when Embed is its own CPAN module. 47 48 49sub WriteMakefile { 50 Carp::croak "WriteMakefile: Need even number of args" if @_ % 2; 51 52 require ExtUtils::MY; 53 my %att = @_; 54 55 _verify_att(\%att); 56 57 my $mm = MM->new(\%att); 58 $mm->flush; 59 60 return $mm; 61} 62 63 64# Basic signatures of the attributes WriteMakefile takes. Each is the 65# reference type. Empty value indicate it takes a non-reference 66# scalar. 67my %Att_Sigs; 68my %Special_Sigs = ( 69 C => 'ARRAY', 70 CONFIG => 'ARRAY', 71 CONFIGURE => 'CODE', 72 DIR => 'ARRAY', 73 DL_FUNCS => 'HASH', 74 DL_VARS => 'ARRAY', 75 EXCLUDE_EXT => 'ARRAY', 76 EXE_FILES => 'ARRAY', 77 FUNCLIST => 'ARRAY', 78 H => 'ARRAY', 79 IMPORTS => 'HASH', 80 INCLUDE_EXT => 'ARRAY', 81 LIBS => ['ARRAY',''], 82 MAN1PODS => 'HASH', 83 MAN3PODS => 'HASH', 84 META_ADD => 'HASH', 85 META_MERGE => 'HASH', 86 PL_FILES => 'HASH', 87 PM => 'HASH', 88 PMLIBDIRS => 'ARRAY', 89 PMLIBPARENTDIRS => 'ARRAY', 90 PREREQ_PM => 'HASH', 91 BUILD_REQUIRES => 'HASH', 92 CONFIGURE_REQUIRES => 'HASH', 93 SKIP => 'ARRAY', 94 TYPEMAPS => 'ARRAY', 95 XS => 'HASH', 96 VERSION => ['version',''], 97 _KEEP_AFTER_FLUSH => '', 98 99 clean => 'HASH', 100 depend => 'HASH', 101 dist => 'HASH', 102 dynamic_lib=> 'HASH', 103 linkext => 'HASH', 104 macro => 'HASH', 105 postamble => 'HASH', 106 realclean => 'HASH', 107 test => 'HASH', 108 tool_autosplit => 'HASH', 109); 110 111@Att_Sigs{keys %Recognized_Att_Keys} = ('') x keys %Recognized_Att_Keys; 112@Att_Sigs{keys %Special_Sigs} = values %Special_Sigs; 113 114 115sub _verify_att { 116 my($att) = @_; 117 118 while( my($key, $val) = each %$att ) { 119 my $sig = $Att_Sigs{$key}; 120 unless( defined $sig ) { 121 warn "WARNING: $key is not a known parameter.\n"; 122 next; 123 } 124 125 my @sigs = ref $sig ? @$sig : $sig; 126 my $given = ref $val; 127 unless( grep { _is_of_type($val, $_) } @sigs ) { 128 my $takes = join " or ", map { _format_att($_) } @sigs; 129 130 my $has = _format_att($given); 131 warn "WARNING: $key takes a $takes not a $has.\n". 132 " Please inform the author.\n"; 133 } 134 } 135} 136 137 138# Check if a given thing is a reference or instance of $type 139sub _is_of_type { 140 my($thing, $type) = @_; 141 142 return 1 if ref $thing eq $type; 143 144 local $SIG{__DIE__}; 145 return 1 if eval{ $thing->isa($type) }; 146 147 return 0; 148} 149 150 151sub _format_att { 152 my $given = shift; 153 154 return $given eq '' ? "string/number" 155 : uc $given eq $given ? "$given reference" 156 : "$given object" 157 ; 158} 159 160 161sub prompt ($;$) { ## no critic 162 my($mess, $def) = @_; 163 Carp::confess("prompt function called without an argument") 164 unless defined $mess; 165 166 my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ; 167 168 my $dispdef = defined $def ? "[$def] " : " "; 169 $def = defined $def ? $def : ""; 170 171 local $|=1; 172 local $\; 173 print "$mess $dispdef"; 174 175 my $ans; 176 if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) { 177 print "$def\n"; 178 } 179 else { 180 $ans = <STDIN>; 181 if( defined $ans ) { 182 chomp $ans; 183 } 184 else { # user hit ctrl-D 185 print "\n"; 186 } 187 } 188 189 return (!defined $ans || $ans eq '') ? $def : $ans; 190} 191 192sub eval_in_subdirs { 193 my($self) = @_; 194 use Cwd qw(cwd abs_path); 195 my $pwd = cwd() || die "Can't figure out your cwd!"; 196 197 local @INC = map eval {abs_path($_) if -e} || $_, @INC; 198 push @INC, '.'; # '.' has to always be at the end of @INC 199 200 foreach my $dir (@{$self->{DIR}}){ 201 my($abs) = $self->catdir($pwd,$dir); 202 eval { $self->eval_in_x($abs); }; 203 last if $@; 204 } 205 chdir $pwd; 206 die $@ if $@; 207} 208 209sub eval_in_x { 210 my($self,$dir) = @_; 211 chdir $dir or Carp::carp("Couldn't change to directory $dir: $!"); 212 213 { 214 package main; 215 do './Makefile.PL'; 216 }; 217 if ($@) { 218# if ($@ =~ /prerequisites/) { 219# die "MakeMaker WARNING: $@"; 220# } else { 221# warn "WARNING from evaluation of $dir/Makefile.PL: $@"; 222# } 223 die "ERROR from evaluation of $dir/Makefile.PL: $@"; 224 } 225} 226 227 228# package name for the classes into which the first object will be blessed 229my $PACKNAME = 'PACK000'; 230 231sub full_setup { 232 $Verbose ||= 0; 233 234 my @attrib_help = qw/ 235 236 AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION 237 C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DISTVNAME 238 DL_FUNCS DL_VARS 239 EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE 240 FULLPERL FULLPERLRUN FULLPERLRUNINST 241 FUNCLIST H IMPORTS 242 243 INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR 244 INSTALLDIRS 245 DESTDIR PREFIX INSTALL_BASE 246 PERLPREFIX SITEPREFIX VENDORPREFIX 247 INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB 248 INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH 249 INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN 250 INSTALLMAN1DIR INSTALLMAN3DIR 251 INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR 252 INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR 253 INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT 254 PERL_LIB PERL_ARCHLIB 255 SITELIBEXP SITEARCHEXP 256 257 INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS LICENSE 258 LINKTYPE MAKE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET 259 META_ADD META_MERGE MIN_PERL_VERSION BUILD_REQUIRES CONFIGURE_REQUIRES 260 MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NORECURS NO_VC OBJECT OPTIMIZE 261 PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE 262 PERL_SRC PERM_DIR PERM_RW PERM_RWX 263 PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC 264 PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ 265 SIGN SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG 266 XS_VERSION clean depend dist dynamic_lib linkext macro realclean 267 tool_autosplit 268 269 MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC 270 MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED 271 /; 272 273 # IMPORTS is used under OS/2 and Win32 274 275 # @Overridable is close to @MM_Sections but not identical. The 276 # order is important. Many subroutines declare macros. These 277 # depend on each other. Let's try to collect the macros up front, 278 # then pasthru, then the rules. 279 280 # MM_Sections are the sections we have to call explicitly 281 # in Overridable we have subroutines that are used indirectly 282 283 284 @MM_Sections = 285 qw( 286 287 post_initialize const_config constants platform_constants 288 tool_autosplit tool_xsubpp tools_other 289 290 makemakerdflt 291 292 dist macro depend cflags const_loadlibs const_cccmd 293 post_constants 294 295 pasthru 296 297 special_targets 298 c_o xs_c xs_o 299 top_targets blibdirs linkext dlsyms dynamic dynamic_bs 300 dynamic_lib static static_lib manifypods processPL 301 installbin subdirs 302 clean_subdirs clean realclean_subdirs realclean 303 metafile signature 304 dist_basics dist_core distdir dist_test dist_ci distmeta distsignature 305 install force perldepend makefile staticmake test ppd 306 307 ); # loses section ordering 308 309 @Overridable = @MM_Sections; 310 push @Overridable, qw[ 311 312 libscan makeaperl needs_linking 313 subdir_x test_via_harness test_via_script 314 315 init_VERSION init_dist init_INST init_INSTALL init_DEST init_dirscan 316 init_PM init_MANPODS init_xs init_PERL init_DIRFILESEP init_linker 317 ]; 318 319 push @MM_Sections, qw[ 320 321 pm_to_blib selfdocument 322 323 ]; 324 325 # Postamble needs to be the last that was always the case 326 push @MM_Sections, "postamble"; 327 push @Overridable, "postamble"; 328 329 # All sections are valid keys. 330 @Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections; 331 332 # we will use all these variables in the Makefile 333 @Get_from_Config = 334 qw( 335 ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld 336 lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib 337 sitelibexp sitearchexp so 338 ); 339 340 # 5.5.3 doesn't have any concept of vendor libs 341 push @Get_from_Config, qw( vendorarchexp vendorlibexp ) if $] >= 5.006; 342 343 foreach my $item (@attrib_help){ 344 $Recognized_Att_Keys{$item} = 1; 345 } 346 foreach my $item (@Get_from_Config) { 347 $Recognized_Att_Keys{uc $item} = $Config{$item}; 348 print "Attribute '\U$item\E' => '$Config{$item}'\n" 349 if ($Verbose >= 2); 350 } 351 352 # 353 # When we eval a Makefile.PL in a subdirectory, that one will ask 354 # us (the parent) for the values and will prepend "..", so that 355 # all files to be installed end up below OUR ./blib 356 # 357 @Prepend_parent = qw( 358 INST_BIN INST_LIB INST_ARCHLIB INST_SCRIPT 359 MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC 360 PERL FULLPERL 361 ); 362} 363 364sub writeMakefile { 365 die <<END; 366 367The extension you are trying to build apparently is rather old and 368most probably outdated. We detect that from the fact, that a 369subroutine "writeMakefile" is called, and this subroutine is not 370supported anymore since about October 1994. 371 372Please contact the author or look into CPAN (details about CPAN can be 373found in the FAQ and at http:/www.perl.com) for a more recent version 374of the extension. If you're really desperate, you can try to change 375the subroutine name from writeMakefile to WriteMakefile and rerun 376'perl Makefile.PL', but you're most probably left alone, when you do 377so. 378 379The MakeMaker team 380 381END 382} 383 384sub new { 385 my($class,$self) = @_; 386 my($key); 387 388 # Store the original args passed to WriteMakefile() 389 foreach my $k (keys %$self) { 390 $self->{ARGS}{$k} = $self->{$k}; 391 } 392 393 $self = {} unless defined $self; 394 395 $self->{PREREQ_PM} ||= {}; 396 $self->{BUILD_REQUIRES} ||= {}; 397 398 # Temporarily bless it into MM so it can be used as an 399 # object. It will be blessed into a temp package later. 400 bless $self, "MM"; 401 402 if ("@ARGV" =~ /\bPREREQ_PRINT\b/) { 403 $self->_PREREQ_PRINT; 404 } 405 406 # PRINT_PREREQ is RedHatism. 407 if ("@ARGV" =~ /\bPRINT_PREREQ\b/) { 408 $self->_PRINT_PREREQ; 409 } 410 411 print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose; 412 if (-f "MANIFEST" && ! -f "Makefile"){ 413 check_manifest(); 414 } 415 416 check_hints($self); 417 418 # Translate X.Y.Z to X.00Y00Z 419 if( defined $self->{MIN_PERL_VERSION} ) { 420 $self->{MIN_PERL_VERSION} =~ s{ ^ (\d+) \. (\d+) \. (\d+) $ } 421 {sprintf "%d.%03d%03d", $1, $2, $3}ex; 422 } 423 424 my $perl_version_ok = eval { 425 local $SIG{__WARN__} = sub { 426 # simulate "use warnings FATAL => 'all'" for vintage perls 427 die @_; 428 }; 429 !$self->{MIN_PERL_VERSION} or $self->{MIN_PERL_VERSION} <= $] 430 }; 431 if (!$perl_version_ok) { 432 if (!defined $perl_version_ok) { 433 warn <<'END'; 434Warning: MIN_PERL_VERSION is not in a recognized format. 435Recommended is a quoted numerical value like '5.005' or '5.008001'. 436END 437 } 438 elsif ($self->{PREREQ_FATAL}) { 439 die sprintf <<"END", $self->{MIN_PERL_VERSION}, $]; 440MakeMaker FATAL: perl version too low for this distribution. 441Required is %s. We run %s. 442END 443 } 444 else { 445 warn sprintf 446 "Warning: Perl version %s or higher required. We run %s.\n", 447 $self->{MIN_PERL_VERSION}, $]; 448 } 449 } 450 451 my %configure_att; # record &{$self->{CONFIGURE}} attributes 452 my(%initial_att) = %$self; # record initial attributes 453 454 my(%unsatisfied) = (); 455 my $prereqs = $self->_all_prereqs; 456 foreach my $prereq (sort keys %$prereqs) { 457 my $required_version = $prereqs->{$prereq}; 458 459 my $installed_file = MM->_installed_file_for_module($prereq); 460 my $pr_version = 0; 461 $pr_version = MM->parse_version($installed_file) if $installed_file; 462 $pr_version = 0 if $pr_version eq 'undef'; 463 464 # convert X.Y_Z alpha version #s to X.YZ for easier comparisons 465 $pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/; 466 467 if (!$installed_file) { 468 warn sprintf "Warning: prerequisite %s %s not found.\n", 469 $prereq, $required_version 470 unless $self->{PREREQ_FATAL}; 471 472 $unsatisfied{$prereq} = 'not installed'; 473 } 474 elsif ($pr_version < $required_version ){ 475 warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n", 476 $prereq, $required_version, ($pr_version || 'unknown version') 477 unless $self->{PREREQ_FATAL}; 478 479 $unsatisfied{$prereq} = $required_version ? $required_version : 'unknown version' ; 480 } 481 } 482 483 if (%unsatisfied && $self->{PREREQ_FATAL}){ 484 my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"} 485 sort { $a cmp $b } keys %unsatisfied; 486 die <<"END"; 487MakeMaker FATAL: prerequisites not found. 488$failedprereqs 489 490Please install these modules first and rerun 'perl Makefile.PL'. 491END 492 } 493 494 if (defined $self->{CONFIGURE}) { 495 if (ref $self->{CONFIGURE} eq 'CODE') { 496 %configure_att = %{&{$self->{CONFIGURE}}}; 497 $self = { %$self, %configure_att }; 498 } else { 499 Carp::croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n"; 500 } 501 } 502 503 # This is for old Makefiles written pre 5.00, will go away 504 if ( Carp::longmess("") =~ /runsubdirpl/s ){ 505 Carp::carp("WARNING: Please rerun 'perl Makefile.PL' to regenerate your Makefiles\n"); 506 } 507 508 my $newclass = ++$PACKNAME; 509 local @Parent = @Parent; # Protect against non-local exits 510 { 511 print "Blessing Object into class [$newclass]\n" if $Verbose>=2; 512 mv_all_methods("MY",$newclass); 513 bless $self, $newclass; 514 push @Parent, $self; 515 require ExtUtils::MY; 516 517 no strict 'refs'; ## no critic; 518 @{"$newclass\:\:ISA"} = 'MM'; 519 } 520 521 if (defined $Parent[-2]){ 522 $self->{PARENT} = $Parent[-2]; 523 for my $key (@Prepend_parent) { 524 next unless defined $self->{PARENT}{$key}; 525 526 # Don't stomp on WriteMakefile() args. 527 next if defined $self->{ARGS}{$key} and 528 $self->{ARGS}{$key} eq $self->{$key}; 529 530 $self->{$key} = $self->{PARENT}{$key}; 531 532 unless ($Is_VMS && $key =~ /PERL$/) { 533 $self->{$key} = $self->catdir("..",$self->{$key}) 534 unless $self->file_name_is_absolute($self->{$key}); 535 } else { 536 # PERL or FULLPERL will be a command verb or even a 537 # command with an argument instead of a full file 538 # specification under VMS. So, don't turn the command 539 # into a filespec, but do add a level to the path of 540 # the argument if not already absolute. 541 my @cmd = split /\s+/, $self->{$key}; 542 $cmd[1] = $self->catfile('[-]',$cmd[1]) 543 unless (@cmd < 2) || $self->file_name_is_absolute($cmd[1]); 544 $self->{$key} = join(' ', @cmd); 545 } 546 } 547 if ($self->{PARENT}) { 548 $self->{PARENT}->{CHILDREN}->{$newclass} = $self; 549 foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE)) { 550 if (exists $self->{PARENT}->{$opt} 551 and not exists $self->{$opt}) 552 { 553 # inherit, but only if already unspecified 554 $self->{$opt} = $self->{PARENT}->{$opt}; 555 } 556 } 557 } 558 my @fm = grep /^FIRST_MAKEFILE=/, @ARGV; 559 parse_args($self,@fm) if @fm; 560 } else { 561 parse_args($self,split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV); 562 } 563 564 565 $self->{NAME} ||= $self->guess_name; 566 567 ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g; 568 569 $self->init_MAKE; 570 $self->init_main; 571 $self->init_VERSION; 572 $self->init_dist; 573 $self->init_INST; 574 $self->init_INSTALL; 575 $self->init_DEST; 576 $self->init_dirscan; 577 $self->init_PM; 578 $self->init_MANPODS; 579 $self->init_xs; 580 $self->init_PERL; 581 $self->init_DIRFILESEP; 582 $self->init_linker; 583 $self->init_ABSTRACT; 584 585 $self->arch_check( 586 $INC{'Config.pm'}, 587 $self->catfile($Config{'archlibexp'}, "Config.pm") 588 ); 589 590 $self->init_others(); 591 $self->init_platform(); 592 $self->init_PERM(); 593 my($argv) = neatvalue(\@ARGV); 594 $argv =~ s/^\[/(/; 595 $argv =~ s/\]$/)/; 596 597 push @{$self->{RESULT}}, <<END; 598# This Makefile is for the $self->{NAME} extension to perl. 599# 600# It was generated automatically by MakeMaker version 601# $VERSION (Revision: $Revision) from the contents of 602# Makefile.PL. Don't edit this file, edit Makefile.PL instead. 603# 604# ANY CHANGES MADE HERE WILL BE LOST! 605# 606# MakeMaker ARGV: $argv 607# 608END 609 610 push @{$self->{RESULT}}, $self->_MakeMaker_Parameters_section(\%initial_att); 611 612 if (defined $self->{CONFIGURE}) { 613 push @{$self->{RESULT}}, <<END; 614 615# MakeMaker 'CONFIGURE' Parameters: 616END 617 if (scalar(keys %configure_att) > 0) { 618 foreach my $key (sort keys %configure_att){ 619 next if $key eq 'ARGS'; 620 my($v) = neatvalue($configure_att{$key}); 621 $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; 622 $v =~ tr/\n/ /s; 623 push @{$self->{RESULT}}, "# $key => $v"; 624 } 625 } 626 else 627 { 628 push @{$self->{RESULT}}, "# no values returned"; 629 } 630 undef %configure_att; # free memory 631 } 632 633 # turn the SKIP array into a SKIPHASH hash 634 for my $skip (@{$self->{SKIP} || []}) { 635 $self->{SKIPHASH}{$skip} = 1; 636 } 637 delete $self->{SKIP}; # free memory 638 639 if ($self->{PARENT}) { 640 for (qw/install dist dist_basics dist_core distdir dist_test dist_ci/) { 641 $self->{SKIPHASH}{$_} = 1; 642 } 643 } 644 645 # We run all the subdirectories now. They don't have much to query 646 # from the parent, but the parent has to query them: if they need linking! 647 unless ($self->{NORECURS}) { 648 $self->eval_in_subdirs if @{$self->{DIR}}; 649 } 650 651 foreach my $section ( @MM_Sections ){ 652 # Support for new foo_target() methods. 653 my $method = $section; 654 $method .= '_target' unless $self->can($method); 655 656 print "Processing Makefile '$section' section\n" if ($Verbose >= 2); 657 my($skipit) = $self->skipcheck($section); 658 if ($skipit){ 659 push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit."; 660 } else { 661 my(%a) = %{$self->{$section} || {}}; 662 push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:"; 663 push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a; 664 push @{$self->{RESULT}}, $self->maketext_filter( 665 $self->$method( %a ) 666 ); 667 } 668 } 669 670 push @{$self->{RESULT}}, "\n# End."; 671 672 $self; 673} 674 675sub WriteEmptyMakefile { 676 Carp::croak "WriteEmptyMakefile: Need an even number of args" if @_ % 2; 677 678 my %att = @_; 679 my $self = MM->new(\%att); 680 681 my $new = $self->{MAKEFILE}; 682 my $old = $self->{MAKEFILE_OLD}; 683 if (-f $old) { 684 _unlink($old) or warn "unlink $old: $!"; 685 } 686 if ( -f $new ) { 687 _rename($new, $old) or warn "rename $new => $old: $!" 688 } 689 open my $mfh, '>', $new or die "open $new for write: $!"; 690 print $mfh <<'EOP'; 691all : 692 693clean : 694 695install : 696 697makemakerdflt : 698 699test : 700 701EOP 702 close $mfh or die "close $new for write: $!"; 703} 704 705 706=begin private 707 708=head3 _installed_file_for_module 709 710 my $file = MM->_installed_file_for_module($module); 711 712Return the first installed .pm $file associated with the $module. The 713one which will show up when you C<use $module>. 714 715$module is something like "strict" or "Test::More". 716 717=end private 718 719=cut 720 721sub _installed_file_for_module { 722 my $class = shift; 723 my $prereq = shift; 724 725 my $file = "$prereq.pm"; 726 $file =~ s{::}{/}g; 727 728 my $path; 729 for my $dir (@INC) { 730 my $tmp = File::Spec->catfile($dir, $file); 731 if ( -r $tmp ) { 732 $path = $tmp; 733 last; 734 } 735 } 736 737 return $path; 738} 739 740 741# Extracted from MakeMaker->new so we can test it 742sub _MakeMaker_Parameters_section { 743 my $self = shift; 744 my $att = shift; 745 746 my @result = <<'END'; 747# MakeMaker Parameters: 748END 749 750 foreach my $key (sort keys %$att){ 751 next if $key eq 'ARGS'; 752 my ($v) = neatvalue($att->{$key}); 753 if ($key eq 'PREREQ_PM') { 754 # CPAN.pm takes prereqs from this field in 'Makefile' 755 # and does not know about BUILD_REQUIRES 756 $v = neatvalue({ %{ $att->{PREREQ_PM} || {} }, %{ $att->{BUILD_REQUIRES} || {} } }); 757 } else { 758 $v = neatvalue($att->{$key}); 759 } 760 761 $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; 762 $v =~ tr/\n/ /s; 763 push @result, "# $key => $v"; 764 } 765 766 return @result; 767} 768 769 770sub check_manifest { 771 print STDOUT "Checking if your kit is complete...\n"; 772 require ExtUtils::Manifest; 773 # avoid warning 774 $ExtUtils::Manifest::Quiet = $ExtUtils::Manifest::Quiet = 1; 775 my(@missed) = ExtUtils::Manifest::manicheck(); 776 if (@missed) { 777 print STDOUT "Warning: the following files are missing in your kit:\n"; 778 print "\t", join "\n\t", @missed; 779 print STDOUT "\n"; 780 print STDOUT "Please inform the author.\n"; 781 } else { 782 print STDOUT "Looks good\n"; 783 } 784} 785 786sub parse_args{ 787 my($self, @args) = @_; 788 foreach (@args) { 789 unless (m/(.*?)=(.*)/) { 790 ++$Verbose if m/^verb/; 791 next; 792 } 793 my($name, $value) = ($1, $2); 794 if ($value =~ m/^~(\w+)?/) { # tilde with optional username 795 $value =~ s [^~(\w*)] 796 [$1 ? 797 ((getpwnam($1))[7] || "~$1") : 798 (getpwuid($>))[7] 799 ]ex; 800 } 801 802 # Remember the original args passed it. It will be useful later. 803 $self->{ARGS}{uc $name} = $self->{uc $name} = $value; 804 } 805 806 # catch old-style 'potential_libs' and inform user how to 'upgrade' 807 if (defined $self->{potential_libs}){ 808 my($msg)="'potential_libs' => '$self->{potential_libs}' should be"; 809 if ($self->{potential_libs}){ 810 print STDOUT "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n"; 811 } else { 812 print STDOUT "$msg deleted.\n"; 813 } 814 $self->{LIBS} = [$self->{potential_libs}]; 815 delete $self->{potential_libs}; 816 } 817 # catch old-style 'ARMAYBE' and inform user how to 'upgrade' 818 if (defined $self->{ARMAYBE}){ 819 my($armaybe) = $self->{ARMAYBE}; 820 print STDOUT "ARMAYBE => '$armaybe' should be changed to:\n", 821 "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n"; 822 my(%dl) = %{$self->{dynamic_lib} || {}}; 823 $self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe}; 824 delete $self->{ARMAYBE}; 825 } 826 if (defined $self->{LDTARGET}){ 827 print STDOUT "LDTARGET should be changed to LDFROM\n"; 828 $self->{LDFROM} = $self->{LDTARGET}; 829 delete $self->{LDTARGET}; 830 } 831 # Turn a DIR argument on the command line into an array 832 if (defined $self->{DIR} && ref \$self->{DIR} eq 'SCALAR') { 833 # So they can choose from the command line, which extensions they want 834 # the grep enables them to have some colons too much in case they 835 # have to build a list with the shell 836 $self->{DIR} = [grep $_, split ":", $self->{DIR}]; 837 } 838 # Turn a INCLUDE_EXT argument on the command line into an array 839 if (defined $self->{INCLUDE_EXT} && ref \$self->{INCLUDE_EXT} eq 'SCALAR') { 840 $self->{INCLUDE_EXT} = [grep $_, split '\s+', $self->{INCLUDE_EXT}]; 841 } 842 # Turn a EXCLUDE_EXT argument on the command line into an array 843 if (defined $self->{EXCLUDE_EXT} && ref \$self->{EXCLUDE_EXT} eq 'SCALAR') { 844 $self->{EXCLUDE_EXT} = [grep $_, split '\s+', $self->{EXCLUDE_EXT}]; 845 } 846 847 foreach my $mmkey (sort keys %$self){ 848 next if $mmkey eq 'ARGS'; 849 print STDOUT " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose; 850 print STDOUT "'$mmkey' is not a known MakeMaker parameter name.\n" 851 unless exists $Recognized_Att_Keys{$mmkey}; 852 } 853 $| = 1 if $Verbose; 854} 855 856sub check_hints { 857 my($self) = @_; 858 # We allow extension-specific hints files. 859 860 require File::Spec; 861 my $curdir = File::Spec->curdir; 862 863 my $hint_dir = File::Spec->catdir($curdir, "hints"); 864 return unless -d $hint_dir; 865 866 # First we look for the best hintsfile we have 867 my($hint)="${^O}_$Config{osvers}"; 868 $hint =~ s/\./_/g; 869 $hint =~ s/_$//; 870 return unless $hint; 871 872 # Also try without trailing minor version numbers. 873 while (1) { 874 last if -f File::Spec->catfile($hint_dir, "$hint.pl"); # found 875 } continue { 876 last unless $hint =~ s/_[^_]*$//; # nothing to cut off 877 } 878 my $hint_file = File::Spec->catfile($hint_dir, "$hint.pl"); 879 880 return unless -f $hint_file; # really there 881 882 _run_hintfile($self, $hint_file); 883} 884 885sub _run_hintfile { 886 our $self; 887 local($self) = shift; # make $self available to the hint file. 888 my($hint_file) = shift; 889 890 local($@, $!); 891 print STDERR "Processing hints file $hint_file\n"; 892 893 # Just in case the ./ isn't on the hint file, which File::Spec can 894 # often strip off, we bung the curdir into @INC 895 local @INC = (File::Spec->curdir, @INC); 896 my $ret = do $hint_file; 897 if( !defined $ret ) { 898 my $error = $@ || $!; 899 print STDERR $error; 900 } 901} 902 903sub mv_all_methods { 904 my($from,$to) = @_; 905 906 # Here you see the *current* list of methods that are overridable 907 # from Makefile.PL via MY:: subroutines. As of VERSION 5.07 I'm 908 # still trying to reduce the list to some reasonable minimum -- 909 # because I want to make it easier for the user. A.K. 910 911 local $SIG{__WARN__} = sub { 912 # can't use 'no warnings redefined', 5.6 only 913 warn @_ unless $_[0] =~ /^Subroutine .* redefined/ 914 }; 915 foreach my $method (@Overridable) { 916 917 # We cannot say "next" here. Nick might call MY->makeaperl 918 # which isn't defined right now 919 920 # Above statement was written at 4.23 time when Tk-b8 was 921 # around. As Tk-b9 only builds with 5.002something and MM 5 is 922 # standard, we try to enable the next line again. It was 923 # commented out until MM 5.23 924 925 next unless defined &{"${from}::$method"}; 926 927 { 928 no strict 'refs'; ## no critic 929 *{"${to}::$method"} = \&{"${from}::$method"}; 930 931 # If we delete a method, then it will be undefined and cannot 932 # be called. But as long as we have Makefile.PLs that rely on 933 # %MY:: being intact, we have to fill the hole with an 934 # inheriting method: 935 936 { 937 package MY; 938 my $super = "SUPER::".$method; 939 *{$method} = sub { 940 shift->$super(@_); 941 }; 942 } 943 } 944 } 945 946 # We have to clean out %INC also, because the current directory is 947 # changed frequently and Graham Barr prefers to get his version 948 # out of a History.pl file which is "required" so woudn't get 949 # loaded again in another extension requiring a History.pl 950 951 # With perl5.002_01 the deletion of entries in %INC caused Tk-b11 952 # to core dump in the middle of a require statement. The required 953 # file was Tk/MMutil.pm. The consequence is, we have to be 954 # extremely careful when we try to give perl a reason to reload a 955 # library with same name. The workaround prefers to drop nothing 956 # from %INC and teach the writers not to use such libraries. 957 958# my $inc; 959# foreach $inc (keys %INC) { 960# #warn "***$inc*** deleted"; 961# delete $INC{$inc}; 962# } 963} 964 965sub skipcheck { 966 my($self) = shift; 967 my($section) = @_; 968 if ($section eq 'dynamic') { 969 print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ", 970 "in skipped section 'dynamic_bs'\n" 971 if $self->{SKIPHASH}{dynamic_bs} && $Verbose; 972 print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ", 973 "in skipped section 'dynamic_lib'\n" 974 if $self->{SKIPHASH}{dynamic_lib} && $Verbose; 975 } 976 if ($section eq 'dynamic_lib') { 977 print STDOUT "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ", 978 "targets in skipped section 'dynamic_bs'\n" 979 if $self->{SKIPHASH}{dynamic_bs} && $Verbose; 980 } 981 if ($section eq 'static') { 982 print STDOUT "Warning (non-fatal): Target 'static' depends on targets ", 983 "in skipped section 'static_lib'\n" 984 if $self->{SKIPHASH}{static_lib} && $Verbose; 985 } 986 return 'skipped' if $self->{SKIPHASH}{$section}; 987 return ''; 988} 989 990sub flush { 991 my $self = shift; 992 993 my $finalname = $self->{MAKEFILE}; 994 print STDOUT "Writing $finalname for $self->{NAME}\n"; 995 996 unlink($finalname, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : ()); 997 open(my $fh,">", "MakeMaker.tmp") 998 or die "Unable to open MakeMaker.tmp: $!"; 999 1000 for my $chunk (@{$self->{RESULT}}) { 1001 print $fh "$chunk\n"; 1002 } 1003 1004 close $fh; 1005 _rename("MakeMaker.tmp", $finalname) or 1006 warn "rename MakeMaker.tmp => $finalname: $!"; 1007 chmod 0644, $finalname unless $Is_VMS; 1008 1009 my %keep = map { ($_ => 1) } qw(NEEDS_LINKING HAS_LINK_CODE); 1010 1011 if ($self->{PARENT} && !$self->{_KEEP_AFTER_FLUSH}) { 1012 foreach (keys %$self) { # safe memory 1013 delete $self->{$_} unless $keep{$_}; 1014 } 1015 } 1016 1017 system("$Config::Config{eunicefix} $finalname") unless $Config::Config{eunicefix} eq ":"; 1018} 1019 1020 1021# This is a rename for OS's where the target must be unlinked first. 1022sub _rename { 1023 my($src, $dest) = @_; 1024 chmod 0666, $dest; 1025 unlink $dest; 1026 return rename $src, $dest; 1027} 1028 1029# This is an unlink for OS's where the target must be writable first. 1030sub _unlink { 1031 my @files = @_; 1032 chmod 0666, @files; 1033 return unlink @files; 1034} 1035 1036 1037# The following mkbootstrap() is only for installations that are calling 1038# the pre-4.1 mkbootstrap() from their old Makefiles. This MakeMaker 1039# writes Makefiles, that use ExtUtils::Mkbootstrap directly. 1040sub mkbootstrap { 1041 die <<END; 1042!!! Your Makefile has been built such a long time ago, !!! 1043!!! that is unlikely to work with current MakeMaker. !!! 1044!!! Please rebuild your Makefile !!! 1045END 1046} 1047 1048# Ditto for mksymlists() as of MakeMaker 5.17 1049sub mksymlists { 1050 die <<END; 1051!!! Your Makefile has been built such a long time ago, !!! 1052!!! that is unlikely to work with current MakeMaker. !!! 1053!!! Please rebuild your Makefile !!! 1054END 1055} 1056 1057sub neatvalue { 1058 my($v) = @_; 1059 return "undef" unless defined $v; 1060 my($t) = ref $v; 1061 return "q[$v]" unless $t; 1062 if ($t eq 'ARRAY') { 1063 my(@m, @neat); 1064 push @m, "["; 1065 foreach my $elem (@$v) { 1066 push @neat, "q[$elem]"; 1067 } 1068 push @m, join ", ", @neat; 1069 push @m, "]"; 1070 return join "", @m; 1071 } 1072 return "$v" unless $t eq 'HASH'; 1073 my(@m, $key, $val); 1074 while (($key,$val) = each %$v){ 1075 last unless defined $key; # cautious programming in case (undef,undef) is true 1076 push(@m,"$key=>".neatvalue($val)) ; 1077 } 1078 return "{ ".join(', ',@m)." }"; 1079} 1080 1081sub selfdocument { 1082 my($self) = @_; 1083 my(@m); 1084 if ($Verbose){ 1085 push @m, "\n# Full list of MakeMaker attribute values:"; 1086 foreach my $key (sort keys %$self){ 1087 next if $key eq 'RESULT' || $key =~ /^[A-Z][a-z]/; 1088 my($v) = neatvalue($self->{$key}); 1089 $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; 1090 $v =~ tr/\n/ /s; 1091 push @m, "# $key => $v"; 1092 } 1093 } 1094 join "\n", @m; 1095} 1096 10971; 1098 1099__END__ 1100 1101=head1 NAME 1102 1103ExtUtils::MakeMaker - Create a module Makefile 1104 1105=head1 SYNOPSIS 1106 1107 use ExtUtils::MakeMaker; 1108 1109 WriteMakefile( ATTRIBUTE => VALUE [, ...] ); 1110 1111=head1 DESCRIPTION 1112 1113This utility is designed to write a Makefile for an extension module 1114from a Makefile.PL. It is based on the Makefile.SH model provided by 1115Andy Dougherty and the perl5-porters. 1116 1117It splits the task of generating the Makefile into several subroutines 1118that can be individually overridden. Each subroutine returns the text 1119it wishes to have written to the Makefile. 1120 1121MakeMaker is object oriented. Each directory below the current 1122directory that contains a Makefile.PL is treated as a separate 1123object. This makes it possible to write an unlimited number of 1124Makefiles with a single invocation of WriteMakefile(). 1125 1126=head2 How To Write A Makefile.PL 1127 1128See ExtUtils::MakeMaker::Tutorial. 1129 1130The long answer is the rest of the manpage :-) 1131 1132=head2 Default Makefile Behaviour 1133 1134The generated Makefile enables the user of the extension to invoke 1135 1136 perl Makefile.PL # optionally "perl Makefile.PL verbose" 1137 make 1138 make test # optionally set TEST_VERBOSE=1 1139 make install # See below 1140 1141The Makefile to be produced may be altered by adding arguments of the 1142form C<KEY=VALUE>. E.g. 1143 1144 perl Makefile.PL INSTALL_BASE=~ 1145 1146Other interesting targets in the generated Makefile are 1147 1148 make config # to check if the Makefile is up-to-date 1149 make clean # delete local temp files (Makefile gets renamed) 1150 make realclean # delete derived files (including ./blib) 1151 make ci # check in all the files in the MANIFEST file 1152 make dist # see below the Distribution Support section 1153 1154=head2 make test 1155 1156MakeMaker checks for the existence of a file named F<test.pl> in the 1157current directory and if it exists it execute the script with the 1158proper set of perl C<-I> options. 1159 1160MakeMaker also checks for any files matching glob("t/*.t"). It will 1161execute all matching files in alphabetical order via the 1162L<Test::Harness> module with the C<-I> switches set correctly. 1163 1164If you'd like to see the raw output of your tests, set the 1165C<TEST_VERBOSE> variable to true. 1166 1167 make test TEST_VERBOSE=1 1168 1169=head2 make testdb 1170 1171A useful variation of the above is the target C<testdb>. It runs the 1172test under the Perl debugger (see L<perldebug>). If the file 1173F<test.pl> exists in the current directory, it is used for the test. 1174 1175If you want to debug some other testfile, set the C<TEST_FILE> variable 1176thusly: 1177 1178 make testdb TEST_FILE=t/mytest.t 1179 1180By default the debugger is called using C<-d> option to perl. If you 1181want to specify some other option, set the C<TESTDB_SW> variable: 1182 1183 make testdb TESTDB_SW=-Dx 1184 1185=head2 make install 1186 1187make alone puts all relevant files into directories that are named by 1188the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR and 1189INST_MAN3DIR. All these default to something below ./blib if you are 1190I<not> building below the perl source directory. If you I<are> 1191building below the perl source, INST_LIB and INST_ARCHLIB default to 1192../../lib, and INST_SCRIPT is not defined. 1193 1194The I<install> target of the generated Makefile copies the files found 1195below each of the INST_* directories to their INSTALL* 1196counterparts. Which counterparts are chosen depends on the setting of 1197INSTALLDIRS according to the following table: 1198 1199 INSTALLDIRS set to 1200 perl site vendor 1201 1202 PERLPREFIX SITEPREFIX VENDORPREFIX 1203 INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH 1204 INST_LIB INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB 1205 INST_BIN INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN 1206 INST_SCRIPT INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT 1207 INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR INSTALLVENDORMAN1DIR 1208 INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR INSTALLVENDORMAN3DIR 1209 1210The INSTALL... macros in turn default to their %Config 1211($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts. 1212 1213You can check the values of these variables on your system with 1214 1215 perl '-V:install.*' 1216 1217And to check the sequence in which the library directories are 1218searched by perl, run 1219 1220 perl -le 'print join $/, @INC' 1221 1222Sometimes older versions of the module you're installing live in other 1223directories in @INC. Because Perl loads the first version of a module it 1224finds, not the newest, you might accidentally get one of these older 1225versions even after installing a brand new version. To delete I<all other 1226versions of the module you're installing> (not simply older ones) set the 1227C<UNINST> variable. 1228 1229 make install UNINST=1 1230 1231 1232=head2 INSTALL_BASE 1233 1234INSTALL_BASE can be passed into Makefile.PL to change where your 1235module will be installed. INSTALL_BASE is more like what everyone 1236else calls "prefix" than PREFIX is. 1237 1238To have everything installed in your home directory, do the following. 1239 1240 # Unix users, INSTALL_BASE=~ works fine 1241 perl Makefile.PL INSTALL_BASE=/path/to/your/home/dir 1242 1243Like PREFIX, it sets several INSTALL* attributes at once. Unlike 1244PREFIX it is easy to predict where the module will end up. The 1245installation pattern looks like this: 1246 1247 INSTALLARCHLIB INSTALL_BASE/lib/perl5/$Config{archname} 1248 INSTALLPRIVLIB INSTALL_BASE/lib/perl5 1249 INSTALLBIN INSTALL_BASE/bin 1250 INSTALLSCRIPT INSTALL_BASE/bin 1251 INSTALLMAN1DIR INSTALL_BASE/man/man1 1252 INSTALLMAN3DIR INSTALL_BASE/man/man3 1253 1254INSTALL_BASE in MakeMaker and C<--install_base> in Module::Build (as 1255of 0.28) install to the same location. If you want MakeMaker and 1256Module::Build to install to the same location simply set INSTALL_BASE 1257and C<--install_base> to the same location. 1258 1259INSTALL_BASE was added in 6.31. 1260 1261 1262=head2 PREFIX and LIB attribute 1263 1264PREFIX and LIB can be used to set several INSTALL* attributes in one 1265go. Here's an example for installing into your home directory. 1266 1267 # Unix users, PREFIX=~ works fine 1268 perl Makefile.PL PREFIX=/path/to/your/home/dir 1269 1270This will install all files in the module under your home directory, 1271with man pages and libraries going into an appropriate place (usually 1272~/man and ~/lib). How the exact location is determined is complicated 1273and depends on how your Perl was configured. INSTALL_BASE works more 1274like what other build systems call "prefix" than PREFIX and we 1275recommend you use that instead. 1276 1277Another way to specify many INSTALL directories with a single 1278parameter is LIB. 1279 1280 perl Makefile.PL LIB=~/lib 1281 1282This will install the module's architecture-independent files into 1283~/lib, the architecture-dependent files into ~/lib/$archname. 1284 1285Note, that in both cases the tilde expansion is done by MakeMaker, not 1286by perl by default, nor by make. 1287 1288Conflicts between parameters LIB, PREFIX and the various INSTALL* 1289arguments are resolved so that: 1290 1291=over 4 1292 1293=item * 1294 1295setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB, 1296INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX); 1297 1298=item * 1299 1300without LIB, setting PREFIX replaces the initial C<$Config{prefix}> 1301part of those INSTALL* arguments, even if the latter are explicitly 1302set (but are set to still start with C<$Config{prefix}>). 1303 1304=back 1305 1306If the user has superuser privileges, and is not working on AFS or 1307relatives, then the defaults for INSTALLPRIVLIB, INSTALLARCHLIB, 1308INSTALLSCRIPT, etc. will be appropriate, and this incantation will be 1309the best: 1310 1311 perl Makefile.PL; 1312 make; 1313 make test 1314 make install 1315 1316make install per default writes some documentation of what has been 1317done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This feature 1318can be bypassed by calling make pure_install. 1319 1320=head2 AFS users 1321 1322will have to specify the installation directories as these most 1323probably have changed since perl itself has been installed. They will 1324have to do this by calling 1325 1326 perl Makefile.PL INSTALLSITELIB=/afs/here/today \ 1327 INSTALLSCRIPT=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages 1328 make 1329 1330Be careful to repeat this procedure every time you recompile an 1331extension, unless you are sure the AFS installation directories are 1332still valid. 1333 1334=head2 Static Linking of a new Perl Binary 1335 1336An extension that is built with the above steps is ready to use on 1337systems supporting dynamic loading. On systems that do not support 1338dynamic loading, any newly created extension has to be linked together 1339with the available resources. MakeMaker supports the linking process 1340by creating appropriate targets in the Makefile whenever an extension 1341is built. You can invoke the corresponding section of the makefile with 1342 1343 make perl 1344 1345That produces a new perl binary in the current directory with all 1346extensions linked in that can be found in INST_ARCHLIB, SITELIBEXP, 1347and PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on 1348UNIX, this is called Makefile.aperl (may be system dependent). If you 1349want to force the creation of a new perl, it is recommended, that you 1350delete this Makefile.aperl, so the directories are searched-through 1351for linkable libraries again. 1352 1353The binary can be installed into the directory where perl normally 1354resides on your machine with 1355 1356 make inst_perl 1357 1358To produce a perl binary with a different name than C<perl>, either say 1359 1360 perl Makefile.PL MAP_TARGET=myperl 1361 make myperl 1362 make inst_perl 1363 1364or say 1365 1366 perl Makefile.PL 1367 make myperl MAP_TARGET=myperl 1368 make inst_perl MAP_TARGET=myperl 1369 1370In any case you will be prompted with the correct invocation of the 1371C<inst_perl> target that installs the new binary into INSTALLBIN. 1372 1373make inst_perl per default writes some documentation of what has been 1374done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This 1375can be bypassed by calling make pure_inst_perl. 1376 1377Warning: the inst_perl: target will most probably overwrite your 1378existing perl binary. Use with care! 1379 1380Sometimes you might want to build a statically linked perl although 1381your system supports dynamic loading. In this case you may explicitly 1382set the linktype with the invocation of the Makefile.PL or make: 1383 1384 perl Makefile.PL LINKTYPE=static # recommended 1385 1386or 1387 1388 make LINKTYPE=static # works on most systems 1389 1390=head2 Determination of Perl Library and Installation Locations 1391 1392MakeMaker needs to know, or to guess, where certain things are 1393located. Especially INST_LIB and INST_ARCHLIB (where to put the files 1394during the make(1) run), PERL_LIB and PERL_ARCHLIB (where to read 1395existing modules from), and PERL_INC (header files and C<libperl*.*>). 1396 1397Extensions may be built either using the contents of the perl source 1398directory tree or from the installed perl library. The recommended way 1399is to build extensions after you have run 'make install' on perl 1400itself. You can do that in any directory on your hard disk that is not 1401below the perl source tree. The support for extensions below the ext 1402directory of the perl distribution is only good for the standard 1403extensions that come with perl. 1404 1405If an extension is being built below the C<ext/> directory of the perl 1406source then MakeMaker will set PERL_SRC automatically (e.g., 1407C<../..>). If PERL_SRC is defined and the extension is recognized as 1408a standard extension, then other variables default to the following: 1409 1410 PERL_INC = PERL_SRC 1411 PERL_LIB = PERL_SRC/lib 1412 PERL_ARCHLIB = PERL_SRC/lib 1413 INST_LIB = PERL_LIB 1414 INST_ARCHLIB = PERL_ARCHLIB 1415 1416If an extension is being built away from the perl source then MakeMaker 1417will leave PERL_SRC undefined and default to using the installed copy 1418of the perl library. The other variables default to the following: 1419 1420 PERL_INC = $archlibexp/CORE 1421 PERL_LIB = $privlibexp 1422 PERL_ARCHLIB = $archlibexp 1423 INST_LIB = ./blib/lib 1424 INST_ARCHLIB = ./blib/arch 1425 1426If perl has not yet been installed then PERL_SRC can be defined on the 1427command line as shown in the previous section. 1428 1429 1430=head2 Which architecture dependent directory? 1431 1432If you don't want to keep the defaults for the INSTALL* macros, 1433MakeMaker helps you to minimize the typing needed: the usual 1434relationship between INSTALLPRIVLIB and INSTALLARCHLIB is determined 1435by Configure at perl compilation time. MakeMaker supports the user who 1436sets INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not, 1437then MakeMaker defaults the latter to be the same subdirectory of 1438INSTALLPRIVLIB as Configure decided for the counterparts in %Config , 1439otherwise it defaults to INSTALLPRIVLIB. The same relationship holds 1440for INSTALLSITELIB and INSTALLSITEARCH. 1441 1442MakeMaker gives you much more freedom than needed to configure 1443internal variables and get different results. It is worth to mention, 1444that make(1) also lets you configure most of the variables that are 1445used in the Makefile. But in the majority of situations this will not 1446be necessary, and should only be done if the author of a package 1447recommends it (or you know what you're doing). 1448 1449=head2 Using Attributes and Parameters 1450 1451The following attributes may be specified as arguments to WriteMakefile() 1452or as NAME=VALUE pairs on the command line. 1453 1454=over 2 1455 1456=item ABSTRACT 1457 1458One line description of the module. Will be included in PPD file. 1459 1460=item ABSTRACT_FROM 1461 1462Name of the file that contains the package description. MakeMaker looks 1463for a line in the POD matching /^($package\s-\s)(.*)/. This is typically 1464the first line in the "=head1 NAME" section. $2 becomes the abstract. 1465 1466=item AUTHOR 1467 1468String containing name (and email address) of package author(s). Is used 1469in PPD (Perl Package Description) files for PPM (Perl Package Manager). 1470 1471=item BINARY_LOCATION 1472 1473Used when creating PPD files for binary packages. It can be set to a 1474full or relative path or URL to the binary archive for a particular 1475architecture. For example: 1476 1477 perl Makefile.PL BINARY_LOCATION=x86/Agent.tar.gz 1478 1479builds a PPD package that references a binary of the C<Agent> package, 1480located in the C<x86> directory relative to the PPD itself. 1481 1482=item BUILD_REQUIRES 1483 1484A hash of modules that are needed to build your module but not run it. 1485 1486This will go into the C<build_requires> field of your F<META.yml>. 1487 1488The format is the same as PREREQ_PM. 1489 1490=item C 1491 1492Ref to array of *.c file names. Initialised from a directory scan 1493and the values portion of the XS attribute hash. This is not 1494currently used by MakeMaker but may be handy in Makefile.PLs. 1495 1496=item CCFLAGS 1497 1498String that will be included in the compiler call command line between 1499the arguments INC and OPTIMIZE. 1500 1501=item CONFIG 1502 1503Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from 1504config.sh. MakeMaker will add to CONFIG the following values anyway: 1505ar 1506cc 1507cccdlflags 1508ccdlflags 1509dlext 1510dlsrc 1511ld 1512lddlflags 1513ldflags 1514libc 1515lib_ext 1516obj_ext 1517ranlib 1518sitelibexp 1519sitearchexp 1520so 1521 1522=item CONFIGURE 1523 1524CODE reference. The subroutine should return a hash reference. The 1525hash may contain further attributes, e.g. {LIBS =E<gt> ...}, that have to 1526be determined by some evaluation method. 1527 1528=item CONFIGURE_REQUIRES 1529 1530A hash of modules that are required to run Makefile.PL itself, but not 1531to run your distribution. 1532 1533This will go into the C<configure_requires> field of your F<META.yml>. 1534 1535Defaults to C<<< { "ExtUtils::MakeMaker" => 0 } >>> 1536 1537The format is the same as PREREQ_PM. 1538 1539=item DEFINE 1540 1541Something like C<"-DHAVE_UNISTD_H"> 1542 1543=item DESTDIR 1544 1545This is the root directory into which the code will be installed. It 1546I<prepends itself to the normal prefix>. For example, if your code 1547would normally go into F</usr/local/lib/perl> you could set DESTDIR=~/tmp/ 1548and installation would go into F<~/tmp/usr/local/lib/perl>. 1549 1550This is primarily of use for people who repackage Perl modules. 1551 1552NOTE: Due to the nature of make, it is important that you put the trailing 1553slash on your DESTDIR. F<~/tmp/> not F<~/tmp>. 1554 1555=item DIR 1556 1557Ref to array of subdirectories containing Makefile.PLs e.g. ['sdbm'] 1558in ext/SDBM_File 1559 1560=item DISTNAME 1561 1562A safe filename for the package. 1563 1564Defaults to NAME above but with :: replaced with -. 1565 1566For example, Foo::Bar becomes Foo-Bar. 1567 1568=item DISTVNAME 1569 1570Your name for distributing the package with the version number 1571included. This is used by 'make dist' to name the resulting archive 1572file. 1573 1574Defaults to DISTNAME-VERSION. 1575 1576For example, version 1.04 of Foo::Bar becomes Foo-Bar-1.04. 1577 1578On some OS's where . has special meaning VERSION_SYM may be used in 1579place of VERSION. 1580 1581=item DL_FUNCS 1582 1583Hashref of symbol names for routines to be made available as universal 1584symbols. Each key/value pair consists of the package name and an 1585array of routine names in that package. Used only under AIX, OS/2, 1586VMS and Win32 at present. The routine names supplied will be expanded 1587in the same way as XSUB names are expanded by the XS() macro. 1588Defaults to 1589 1590 {"$(NAME)" => ["boot_$(NAME)" ] } 1591 1592e.g. 1593 1594 {"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )], 1595 "NetconfigPtr" => [ 'DESTROY'] } 1596 1597Please see the L<ExtUtils::Mksymlists> documentation for more information 1598about the DL_FUNCS, DL_VARS and FUNCLIST attributes. 1599 1600=item DL_VARS 1601 1602Array of symbol names for variables to be made available as universal symbols. 1603Used only under AIX, OS/2, VMS and Win32 at present. Defaults to []. 1604(e.g. [ qw(Foo_version Foo_numstreams Foo_tree ) ]) 1605 1606=item EXCLUDE_EXT 1607 1608Array of extension names to exclude when doing a static build. This 1609is ignored if INCLUDE_EXT is present. Consult INCLUDE_EXT for more 1610details. (e.g. [ qw( Socket POSIX ) ] ) 1611 1612This attribute may be most useful when specified as a string on the 1613command line: perl Makefile.PL EXCLUDE_EXT='Socket Safe' 1614 1615=item EXE_FILES 1616 1617Ref to array of executable files. The files will be copied to the 1618INST_SCRIPT directory. Make realclean will delete them from there 1619again. 1620 1621If your executables start with something like #!perl or 1622#!/usr/bin/perl MakeMaker will change this to the path of the perl 1623'Makefile.PL' was invoked with so the programs will be sure to run 1624properly even if perl is not in /usr/bin/perl. 1625 1626=item FIRST_MAKEFILE 1627 1628The name of the Makefile to be produced. This is used for the second 1629Makefile that will be produced for the MAP_TARGET. 1630 1631Defaults to 'Makefile' or 'Descrip.MMS' on VMS. 1632 1633(Note: we couldn't use MAKEFILE because dmake uses this for something 1634else). 1635 1636=item FULLPERL 1637 1638Perl binary able to run this extension, load XS modules, etc... 1639 1640=item FULLPERLRUN 1641 1642Like PERLRUN, except it uses FULLPERL. 1643 1644=item FULLPERLRUNINST 1645 1646Like PERLRUNINST, except it uses FULLPERL. 1647 1648=item FUNCLIST 1649 1650This provides an alternate means to specify function names to be 1651exported from the extension. Its value is a reference to an 1652array of function names to be exported by the extension. These 1653names are passed through unaltered to the linker options file. 1654 1655=item H 1656 1657Ref to array of *.h file names. Similar to C. 1658 1659=item IMPORTS 1660 1661This attribute is used to specify names to be imported into the 1662extension. Takes a hash ref. 1663 1664It is only used on OS/2 and Win32. 1665 1666=item INC 1667 1668Include file dirs eg: C<"-I/usr/5include -I/path/to/inc"> 1669 1670=item INCLUDE_EXT 1671 1672Array of extension names to be included when doing a static build. 1673MakeMaker will normally build with all of the installed extensions when 1674doing a static build, and that is usually the desired behavior. If 1675INCLUDE_EXT is present then MakeMaker will build only with those extensions 1676which are explicitly mentioned. (e.g. [ qw( Socket POSIX ) ]) 1677 1678It is not necessary to mention DynaLoader or the current extension when 1679filling in INCLUDE_EXT. If the INCLUDE_EXT is mentioned but is empty then 1680only DynaLoader and the current extension will be included in the build. 1681 1682This attribute may be most useful when specified as a string on the 1683command line: perl Makefile.PL INCLUDE_EXT='POSIX Socket Devel::Peek' 1684 1685=item INSTALLARCHLIB 1686 1687Used by 'make install', which copies files from INST_ARCHLIB to this 1688directory if INSTALLDIRS is set to perl. 1689 1690=item INSTALLBIN 1691 1692Directory to install binary files (e.g. tkperl) into if 1693INSTALLDIRS=perl. 1694 1695=item INSTALLDIRS 1696 1697Determines which of the sets of installation directories to choose: 1698perl, site or vendor. Defaults to site. 1699 1700=item INSTALLMAN1DIR 1701 1702=item INSTALLMAN3DIR 1703 1704These directories get the man pages at 'make install' time if 1705INSTALLDIRS=perl. Defaults to $Config{installman*dir}. 1706 1707If set to 'none', no man pages will be installed. 1708 1709=item INSTALLPRIVLIB 1710 1711Used by 'make install', which copies files from INST_LIB to this 1712directory if INSTALLDIRS is set to perl. 1713 1714Defaults to $Config{installprivlib}. 1715 1716=item INSTALLSCRIPT 1717 1718Used by 'make install' which copies files from INST_SCRIPT to this 1719directory if INSTALLDIRS=perl. 1720 1721=item INSTALLSITEARCH 1722 1723Used by 'make install', which copies files from INST_ARCHLIB to this 1724directory if INSTALLDIRS is set to site (default). 1725 1726=item INSTALLSITEBIN 1727 1728Used by 'make install', which copies files from INST_BIN to this 1729directory if INSTALLDIRS is set to site (default). 1730 1731=item INSTALLSITELIB 1732 1733Used by 'make install', which copies files from INST_LIB to this 1734directory if INSTALLDIRS is set to site (default). 1735 1736=item INSTALLSITEMAN1DIR 1737 1738=item INSTALLSITEMAN3DIR 1739 1740These directories get the man pages at 'make install' time if 1741INSTALLDIRS=site (default). Defaults to 1742$(SITEPREFIX)/man/man$(MAN*EXT). 1743 1744If set to 'none', no man pages will be installed. 1745 1746=item INSTALLSITESCRIPT 1747 1748Used by 'make install' which copies files from INST_SCRIPT to this 1749directory if INSTALLDIRS is set to site (default). 1750 1751=item INSTALLVENDORARCH 1752 1753Used by 'make install', which copies files from INST_ARCHLIB to this 1754directory if INSTALLDIRS is set to vendor. 1755 1756=item INSTALLVENDORBIN 1757 1758Used by 'make install', which copies files from INST_BIN to this 1759directory if INSTALLDIRS is set to vendor. 1760 1761=item INSTALLVENDORLIB 1762 1763Used by 'make install', which copies files from INST_LIB to this 1764directory if INSTALLDIRS is set to vendor. 1765 1766=item INSTALLVENDORMAN1DIR 1767 1768=item INSTALLVENDORMAN3DIR 1769 1770These directories get the man pages at 'make install' time if 1771INSTALLDIRS=vendor. Defaults to $(VENDORPREFIX)/man/man$(MAN*EXT). 1772 1773If set to 'none', no man pages will be installed. 1774 1775=item INSTALLVENDORSCRIPT 1776 1777Used by 'make install' which copies files from INST_SCRIPT to this 1778directory if INSTALLDIRS is set to vendor. 1779 1780=item INST_ARCHLIB 1781 1782Same as INST_LIB for architecture dependent files. 1783 1784=item INST_BIN 1785 1786Directory to put real binary files during 'make'. These will be copied 1787to INSTALLBIN during 'make install' 1788 1789=item INST_LIB 1790 1791Directory where we put library files of this extension while building 1792it. 1793 1794=item INST_MAN1DIR 1795 1796Directory to hold the man pages at 'make' time 1797 1798=item INST_MAN3DIR 1799 1800Directory to hold the man pages at 'make' time 1801 1802=item INST_SCRIPT 1803 1804Directory, where executable files should be installed during 1805'make'. Defaults to "./blib/script", just to have a dummy location during 1806testing. make install will copy the files in INST_SCRIPT to 1807INSTALLSCRIPT. 1808 1809=item LD 1810 1811Program to be used to link libraries for dynamic loading. 1812 1813Defaults to $Config{ld}. 1814 1815=item LDDLFLAGS 1816 1817Any special flags that might need to be passed to ld to create a 1818shared library suitable for dynamic loading. It is up to the makefile 1819to use it. (See L<Config/lddlflags>) 1820 1821Defaults to $Config{lddlflags}. 1822 1823=item LDFROM 1824 1825Defaults to "$(OBJECT)" and is used in the ld command to specify 1826what files to link/load from (also see dynamic_lib below for how to 1827specify ld flags) 1828 1829=item LIB 1830 1831LIB should only be set at C<perl Makefile.PL> time but is allowed as a 1832MakeMaker argument. It has the effect of setting both INSTALLPRIVLIB 1833and INSTALLSITELIB to that value regardless any explicit setting of 1834those arguments (or of PREFIX). INSTALLARCHLIB and INSTALLSITEARCH 1835are set to the corresponding architecture subdirectory. 1836 1837=item LIBPERL_A 1838 1839The filename of the perllibrary that will be used together with this 1840extension. Defaults to libperl.a. 1841 1842=item LIBS 1843 1844An anonymous array of alternative library 1845specifications to be searched for (in order) until 1846at least one library is found. E.g. 1847 1848 'LIBS' => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"] 1849 1850Mind, that any element of the array 1851contains a complete set of arguments for the ld 1852command. So do not specify 1853 1854 'LIBS' => ["-ltcl", "-ltk", "-lX11"] 1855 1856See ODBM_File/Makefile.PL for an example, where an array is needed. If 1857you specify a scalar as in 1858 1859 'LIBS' => "-ltcl -ltk -lX11" 1860 1861MakeMaker will turn it into an array with one element. 1862 1863=item LICENSE 1864 1865The licensing terms of your distribution. Generally its "perl" for the 1866same license as Perl itself. 1867 1868See L<Module::Build::API> for the list of options. 1869 1870Defaults to "unknown". 1871 1872=item LINKTYPE 1873 1874'static' or 'dynamic' (default unless usedl=undef in 1875config.sh). Should only be used to force static linking (also see 1876linkext below). 1877 1878=item MAKE 1879 1880Variant of make you intend to run the generated Makefile with. This 1881parameter lets Makefile.PL know what make quirks to account for when 1882generating the Makefile. 1883 1884MakeMaker also honors the MAKE environment variable. This parameter 1885takes precedent. 1886 1887Currently the only significant values are 'dmake' and 'nmake' for Windows 1888users. 1889 1890Defaults to $Config{make}. 1891 1892=item MAKEAPERL 1893 1894Boolean which tells MakeMaker, that it should include the rules to 1895make a perl. This is handled automatically as a switch by 1896MakeMaker. The user normally does not need it. 1897 1898=item MAKEFILE_OLD 1899 1900When 'make clean' or similar is run, the $(FIRST_MAKEFILE) will be 1901backed up at this location. 1902 1903Defaults to $(FIRST_MAKEFILE).old or $(FIRST_MAKEFILE)_old on VMS. 1904 1905=item MAN1PODS 1906 1907Hashref of pod-containing files. MakeMaker will default this to all 1908EXE_FILES files that include POD directives. The files listed 1909here will be converted to man pages and installed as was requested 1910at Configure time. 1911 1912This hash should map POD files (or scripts containing POD) to the 1913man file names under the C<blib/man1/> directory, as in the following 1914example: 1915 1916 MAN1PODS => { 1917 'doc/command.pod' => 'blib/man1/command.1', 1918 'scripts/script.pl' => 'blib/man1/script.1', 1919 } 1920 1921=item MAN3PODS 1922 1923Hashref that assigns to *.pm and *.pod files the files into which the 1924manpages are to be written. MakeMaker parses all *.pod and *.pm files 1925for POD directives. Files that contain POD will be the default keys of 1926the MAN3PODS hashref. These will then be converted to man pages during 1927C<make> and will be installed during C<make install>. 1928 1929Example similar to MAN1PODS. 1930 1931=item MAP_TARGET 1932 1933If it is intended, that a new perl binary be produced, this variable 1934may hold a name for that binary. Defaults to perl 1935 1936=item META_ADD 1937 1938=item META_MERGE 1939 1940A hashrefs of items to add to the F<META.yml>. 1941 1942They differ in how they behave if they have the same key as the 1943default metadata. META_ADD will override the default value with it's 1944own. META_MERGE will merge its value with the default. 1945 1946Unless you want to override the defaults, prefer META_MERGE so as to 1947get the advantage of any future defaults. 1948 1949=item MIN_PERL_VERSION 1950 1951The minimum required version of Perl for this distribution. 1952 1953Either 5.006001 or 5.6.1 format is acceptable. 1954 1955=item MYEXTLIB 1956 1957If the extension links to a library that it builds set this to the 1958name of the library (see SDBM_File) 1959 1960=item NAME 1961 1962Perl module name for this extension (DBD::Oracle). This will default 1963to the directory name but should be explicitly defined in the 1964Makefile.PL. 1965 1966=item NEEDS_LINKING 1967 1968MakeMaker will figure out if an extension contains linkable code 1969anywhere down the directory tree, and will set this variable 1970accordingly, but you can speed it up a very little bit if you define 1971this boolean variable yourself. 1972 1973=item NOECHO 1974 1975Command so make does not print the literal commands its running. 1976 1977By setting it to an empty string you can generate a Makefile that 1978prints all commands. Mainly used in debugging MakeMaker itself. 1979 1980Defaults to C<@>. 1981 1982=item NORECURS 1983 1984Boolean. Attribute to inhibit descending into subdirectories. 1985 1986=item NO_META 1987 1988When true, suppresses the generation and addition to the MANIFEST of 1989the META.yml module meta-data file during 'make distdir'. 1990 1991Defaults to false. 1992 1993=item NO_VC 1994 1995In general, any generated Makefile checks for the current version of 1996MakeMaker and the version the Makefile was built under. If NO_VC is 1997set, the version check is neglected. Do not write this into your 1998Makefile.PL, use it interactively instead. 1999 2000=item OBJECT 2001 2002List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long 2003string containing all object files, e.g. "tkpBind.o 2004tkpButton.o tkpCanvas.o" 2005 2006(Where BASEEXT is the last component of NAME, and OBJ_EXT is $Config{obj_ext}.) 2007 2008=item OPTIMIZE 2009 2010Defaults to C<-O>. Set it to C<-g> to turn debugging on. The flag is 2011passed to subdirectory makes. 2012 2013=item PERL 2014 2015Perl binary for tasks that can be done by miniperl 2016 2017=item PERL_CORE 2018 2019Set only when MakeMaker is building the extensions of the Perl core 2020distribution. 2021 2022=item PERLMAINCC 2023 2024The call to the program that is able to compile perlmain.c. Defaults 2025to $(CC). 2026 2027=item PERL_ARCHLIB 2028 2029Same as for PERL_LIB, but for architecture dependent files. 2030 2031Used only when MakeMaker is building the extensions of the Perl core 2032distribution (because normally $(PERL_ARCHLIB) is automatically in @INC, 2033and adding it would get in the way of PERL5LIB). 2034 2035=item PERL_LIB 2036 2037Directory containing the Perl library to use. 2038 2039Used only when MakeMaker is building the extensions of the Perl core 2040distribution (because normally $(PERL_LIB) is automatically in @INC, 2041and adding it would get in the way of PERL5LIB). 2042 2043=item PERL_MALLOC_OK 2044 2045defaults to 0. Should be set to TRUE if the extension can work with 2046the memory allocation routines substituted by the Perl malloc() subsystem. 2047This should be applicable to most extensions with exceptions of those 2048 2049=over 4 2050 2051=item * 2052 2053with bugs in memory allocations which are caught by Perl's malloc(); 2054 2055=item * 2056 2057which interact with the memory allocator in other ways than via 2058malloc(), realloc(), free(), calloc(), sbrk() and brk(); 2059 2060=item * 2061 2062which rely on special alignment which is not provided by Perl's malloc(). 2063 2064=back 2065 2066B<NOTE.> Negligence to set this flag in I<any one> of loaded extension 2067nullifies many advantages of Perl's malloc(), such as better usage of 2068system resources, error detection, memory usage reporting, catchable failure 2069of memory allocations, etc. 2070 2071=item PERLPREFIX 2072 2073Directory under which core modules are to be installed. 2074 2075Defaults to $Config{installprefixexp} falling back to 2076$Config{installprefix}, $Config{prefixexp} or $Config{prefix} should 2077$Config{installprefixexp} not exist. 2078 2079Overridden by PREFIX. 2080 2081=item PERLRUN 2082 2083Use this instead of $(PERL) when you wish to run perl. It will set up 2084extra necessary flags for you. 2085 2086=item PERLRUNINST 2087 2088Use this instead of $(PERL) when you wish to run perl to work with 2089modules. It will add things like -I$(INST_ARCH) and other necessary 2090flags so perl can see the modules you're about to install. 2091 2092=item PERL_SRC 2093 2094Directory containing the Perl source code (use of this should be 2095avoided, it may be undefined) 2096 2097=item PERM_DIR 2098 2099Desired permission for directories. Defaults to C<755>. 2100 2101=item PERM_RW 2102 2103Desired permission for read/writable files. Defaults to C<644>. 2104 2105=item PERM_RWX 2106 2107Desired permission for executable files. Defaults to C<755>. 2108 2109=item PL_FILES 2110 2111MakeMaker can run programs to generate files for you at build time. 2112By default any file named *.PL (except Makefile.PL and Build.PL) in 2113the top level directory will be assumed to be a Perl program and run 2114passing its own basename in as an argument. For example... 2115 2116 perl foo.PL foo 2117 2118This behavior can be overridden by supplying your own set of files to 2119search. PL_FILES accepts a hash ref, the key being the file to run 2120and the value is passed in as the first argument when the PL file is run. 2121 2122 PL_FILES => {'bin/foobar.PL' => 'bin/foobar'} 2123 2124Would run bin/foobar.PL like this: 2125 2126 perl bin/foobar.PL bin/foobar 2127 2128If multiple files from one program are desired an array ref can be used. 2129 2130 PL_FILES => {'bin/foobar.PL' => [qw(bin/foobar1 bin/foobar2)]} 2131 2132In this case the program will be run multiple times using each target file. 2133 2134 perl bin/foobar.PL bin/foobar1 2135 perl bin/foobar.PL bin/foobar2 2136 2137PL files are normally run B<after> pm_to_blib and include INST_LIB and 2138INST_ARCH in its C<@INC> so the just built modules can be 2139accessed... unless the PL file is making a module (or anything else in 2140PM) in which case it is run B<before> pm_to_blib and does not include 2141INST_LIB and INST_ARCH in its C<@INC>. This apparently odd behavior 2142is there for backwards compatibility (and its somewhat DWIM). 2143 2144 2145=item PM 2146 2147Hashref of .pm files and *.pl files to be installed. e.g. 2148 2149 {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'} 2150 2151By default this will include *.pm and *.pl and the files found in 2152the PMLIBDIRS directories. Defining PM in the 2153Makefile.PL will override PMLIBDIRS. 2154 2155=item PMLIBDIRS 2156 2157Ref to array of subdirectories containing library files. Defaults to 2158[ 'lib', $(BASEEXT) ]. The directories will be scanned and I<any> files 2159they contain will be installed in the corresponding location in the 2160library. A libscan() method can be used to alter the behaviour. 2161Defining PM in the Makefile.PL will override PMLIBDIRS. 2162 2163(Where BASEEXT is the last component of NAME.) 2164 2165=item PM_FILTER 2166 2167A filter program, in the traditional Unix sense (input from stdin, output 2168to stdout) that is passed on each .pm file during the build (in the 2169pm_to_blib() phase). It is empty by default, meaning no filtering is done. 2170 2171Great care is necessary when defining the command if quoting needs to be 2172done. For instance, you would need to say: 2173 2174 {'PM_FILTER' => 'grep -v \\"^\\#\\"'} 2175 2176to remove all the leading comments on the fly during the build. The 2177extra \\ are necessary, unfortunately, because this variable is interpolated 2178within the context of a Perl program built on the command line, and double 2179quotes are what is used with the -e switch to build that command line. The 2180# is escaped for the Makefile, since what is going to be generated will then 2181be: 2182 2183 PM_FILTER = grep -v \"^\#\" 2184 2185Without the \\ before the #, we'd have the start of a Makefile comment, 2186and the macro would be incorrectly defined. 2187 2188=item POLLUTE 2189 2190Release 5.005 grandfathered old global symbol names by providing preprocessor 2191macros for extension source compatibility. As of release 5.6, these 2192preprocessor definitions are not available by default. The POLLUTE flag 2193specifies that the old names should still be defined: 2194 2195 perl Makefile.PL POLLUTE=1 2196 2197Please inform the module author if this is necessary to successfully install 2198a module under 5.6 or later. 2199 2200=item PPM_INSTALL_EXEC 2201 2202Name of the executable used to run C<PPM_INSTALL_SCRIPT> below. (e.g. perl) 2203 2204=item PPM_INSTALL_SCRIPT 2205 2206Name of the script that gets executed by the Perl Package Manager after 2207the installation of a package. 2208 2209=item PREFIX 2210 2211This overrides all the default install locations. Man pages, 2212libraries, scripts, etc... MakeMaker will try to make an educated 2213guess about where to place things under the new PREFIX based on your 2214Config defaults. Failing that, it will fall back to a structure 2215which should be sensible for your platform. 2216 2217If you specify LIB or any INSTALL* variables they will not be effected 2218by the PREFIX. 2219 2220=item PREREQ_FATAL 2221 2222Bool. If this parameter is true, failing to have the required modules 2223(or the right versions thereof) will be fatal. C<perl Makefile.PL> 2224will C<die> instead of simply informing the user of the missing dependencies. 2225 2226It is I<extremely> rare to have to use C<PREREQ_FATAL>. Its use by module 2227authors is I<strongly discouraged> and should never be used lightly. 2228Module installation tools have ways of resolving umet dependencies but 2229to do that they need a F<Makefile>. Using C<PREREQ_FATAL> breaks this. 2230That's bad. 2231 2232The only situation where it is appropriate is when you have 2233dependencies that are indispensible to actually I<write> a 2234F<Makefile>. For example, MakeMaker's F<Makefile.PL> needs L<File::Spec>. 2235If its not available it cannot write the F<Makefile>. 2236 2237Note: see L<Test::Harness> for a shortcut for stopping tests early 2238if you are missing dependencies and are afraid that users might 2239use your module with an incomplete environment. 2240 2241=item PREREQ_PM 2242 2243A hash of modules that are needed to run your module. The keys are 2244the module names ie. Test::More, and the minimum version is the 2245value. If the required version number is 0 any version will do. 2246 2247This will go into the C<requires> field of your F<META.yml>. 2248 2249 PREREQ_PM => { 2250 # Require Test::More at least 0.47 2251 "Test::More" => "0.47", 2252 2253 # Require any version of Acme::Buffy 2254 "Acme::Buffy" => 0, 2255 } 2256 2257=item PREREQ_PRINT 2258 2259Bool. If this parameter is true, the prerequisites will be printed to 2260stdout and MakeMaker will exit. The output format is an evalable hash 2261ref. 2262 2263 $PREREQ_PM = { 2264 'A::B' => Vers1, 2265 'C::D' => Vers2, 2266 ... 2267 }; 2268 2269If a distribution defines a minimal required perl version, this is 2270added to the output as an additional line of the form: 2271 2272 $MIN_PERL_VERSION = '5.008001'; 2273 2274If BUILD_REQUIRES is not empty, it will be dumped as $BUILD_REQUIRES hasref. 2275 2276=item PRINT_PREREQ 2277 2278RedHatism for C<PREREQ_PRINT>. The output format is different, though: 2279 2280 perl(A::B)>=Vers1 perl(C::D)>=Vers2 ... 2281 2282A minimal required perl version, if present, will look like this: 2283 2284 perl(perl)>=5.008001 2285 2286=item SITEPREFIX 2287 2288Like PERLPREFIX, but only for the site install locations. 2289 2290Defaults to $Config{siteprefixexp}. Perls prior to 5.6.0 didn't have 2291an explicit siteprefix in the Config. In those cases 2292$Config{installprefix} will be used. 2293 2294Overridable by PREFIX 2295 2296=item SIGN 2297 2298When true, perform the generation and addition to the MANIFEST of the 2299SIGNATURE file in the distdir during 'make distdir', via 'cpansign 2300-s'. 2301 2302Note that you need to install the Module::Signature module to 2303perform this operation. 2304 2305Defaults to false. 2306 2307=item SKIP 2308 2309Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the 2310Makefile. Caution! Do not use the SKIP attribute for the negligible 2311speedup. It may seriously damage the resulting Makefile. Only use it 2312if you really need it. 2313 2314=item TYPEMAPS 2315 2316Ref to array of typemap file names. Use this when the typemaps are 2317in some directory other than the current directory or when they are 2318not named B<typemap>. The last typemap in the list takes 2319precedence. A typemap in the current directory has highest 2320precedence, even if it isn't listed in TYPEMAPS. The default system 2321typemap has lowest precedence. 2322 2323=item VENDORPREFIX 2324 2325Like PERLPREFIX, but only for the vendor install locations. 2326 2327Defaults to $Config{vendorprefixexp}. 2328 2329Overridable by PREFIX 2330 2331=item VERBINST 2332 2333If true, make install will be verbose 2334 2335=item VERSION 2336 2337Your version number for distributing the package. This defaults to 23380.1. 2339 2340=item VERSION_FROM 2341 2342Instead of specifying the VERSION in the Makefile.PL you can let 2343MakeMaker parse a file to determine the version number. The parsing 2344routine requires that the file named by VERSION_FROM contains one 2345single line to compute the version number. The first line in the file 2346that contains something like a $VERSION assignment or C<package Name 2347VERSION> will be used. The following lines will be parsed o.k.: 2348 2349 # Good 2350 package Foo::Bar 1.23; # 1.23 2351 $VERSION = '1.00'; # 1.00 2352 *VERSION = \'1.01'; # 1.01 2353 ($VERSION) = q$Revision$ =~ /(\d+)/g; # The digits in $Revision$ 2354 $FOO::VERSION = '1.10'; # 1.10 2355 *FOO::VERSION = \'1.11'; # 1.11 2356 2357but these will fail: 2358 2359 # Bad 2360 my $VERSION = '1.01'; 2361 local $VERSION = '1.02'; 2362 local $FOO::VERSION = '1.30'; 2363 2364"Version strings" are incompatible should not be used. 2365 2366 # Bad 2367 $VERSION = 1.2.3; 2368 $VERSION = v1.2.3; 2369 2370L<version> objects are fine. As of MakeMaker 6.35 version.pm will be 2371automatically loaded, but you must declare the dependency on version.pm. 2372For compatibility with older MakeMaker you should load on the same line 2373as $VERSION is declared. 2374 2375 # All on one line 2376 use version; our $VERSION = qv(1.2.3); 2377 2378(Putting C<my> or C<local> on the preceding line will work o.k.) 2379 2380The file named in VERSION_FROM is not added as a dependency to 2381Makefile. This is not really correct, but it would be a major pain 2382during development to have to rewrite the Makefile for any smallish 2383change in that file. If you want to make sure that the Makefile 2384contains the correct VERSION macro after any change of the file, you 2385would have to do something like 2386 2387 depend => { Makefile => '$(VERSION_FROM)' } 2388 2389See attribute C<depend> below. 2390 2391=item VERSION_SYM 2392 2393A sanitized VERSION with . replaced by _. For places where . has 2394special meaning (some filesystems, RCS labels, etc...) 2395 2396=item XS 2397 2398Hashref of .xs files. MakeMaker will default this. e.g. 2399 2400 {'name_of_file.xs' => 'name_of_file.c'} 2401 2402The .c files will automatically be included in the list of files 2403deleted by a make clean. 2404 2405=item XSOPT 2406 2407String of options to pass to xsubpp. This might include C<-C++> or 2408C<-extern>. Do not include typemaps here; the TYPEMAP parameter exists for 2409that purpose. 2410 2411=item XSPROTOARG 2412 2413May be set to an empty string, which is identical to C<-prototypes>, or 2414C<-noprototypes>. See the xsubpp documentation for details. MakeMaker 2415defaults to the empty string. 2416 2417=item XS_VERSION 2418 2419Your version number for the .xs file of this package. This defaults 2420to the value of the VERSION attribute. 2421 2422=back 2423 2424=head2 Additional lowercase attributes 2425 2426can be used to pass parameters to the methods which implement that 2427part of the Makefile. Parameters are specified as a hash ref but are 2428passed to the method as a hash. 2429 2430=over 2 2431 2432=item clean 2433 2434 {FILES => "*.xyz foo"} 2435 2436=item depend 2437 2438 {ANY_TARGET => ANY_DEPENDENCY, ...} 2439 2440(ANY_TARGET must not be given a double-colon rule by MakeMaker.) 2441 2442=item dist 2443 2444 {TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz', 2445 SHAR => 'shar -m', DIST_CP => 'ln', ZIP => '/bin/zip', 2446 ZIPFLAGS => '-rl', DIST_DEFAULT => 'private tardist' } 2447 2448If you specify COMPRESS, then SUFFIX should also be altered, as it is 2449needed to tell make the target file of the compression. Setting 2450DIST_CP to ln can be useful, if you need to preserve the timestamps on 2451your files. DIST_CP can take the values 'cp', which copies the file, 2452'ln', which links the file, and 'best' which copies symbolic links and 2453links the rest. Default is 'best'. 2454 2455=item dynamic_lib 2456 2457 {ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'} 2458 2459=item linkext 2460 2461 {LINKTYPE => 'static', 'dynamic' or ''} 2462 2463NB: Extensions that have nothing but *.pm files had to say 2464 2465 {LINKTYPE => ''} 2466 2467with Pre-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line 2468can be deleted safely. MakeMaker recognizes when there's nothing to 2469be linked. 2470 2471=item macro 2472 2473 {ANY_MACRO => ANY_VALUE, ...} 2474 2475=item postamble 2476 2477Anything put here will be passed to MY::postamble() if you have one. 2478 2479=item realclean 2480 2481 {FILES => '$(INST_ARCHAUTODIR)/*.xyz'} 2482 2483=item test 2484 2485 {TESTS => 't/*.t'} 2486 2487=item tool_autosplit 2488 2489 {MAXLEN => 8} 2490 2491=back 2492 2493=head2 Overriding MakeMaker Methods 2494 2495If you cannot achieve the desired Makefile behaviour by specifying 2496attributes you may define private subroutines in the Makefile.PL. 2497Each subroutine returns the text it wishes to have written to 2498the Makefile. To override a section of the Makefile you can 2499either say: 2500 2501 sub MY::c_o { "new literal text" } 2502 2503or you can edit the default by saying something like: 2504 2505 package MY; # so that "SUPER" works right 2506 sub c_o { 2507 my $inherited = shift->SUPER::c_o(@_); 2508 $inherited =~ s/old text/new text/; 2509 $inherited; 2510 } 2511 2512If you are running experiments with embedding perl as a library into 2513other applications, you might find MakeMaker is not sufficient. You'd 2514better have a look at ExtUtils::Embed which is a collection of utilities 2515for embedding. 2516 2517If you still need a different solution, try to develop another 2518subroutine that fits your needs and submit the diffs to 2519C<makemaker@perl.org> 2520 2521For a complete description of all MakeMaker methods see 2522L<ExtUtils::MM_Unix>. 2523 2524Here is a simple example of how to add a new target to the generated 2525Makefile: 2526 2527 sub MY::postamble { 2528 return <<'MAKE_FRAG'; 2529 $(MYEXTLIB): sdbm/Makefile 2530 cd sdbm && $(MAKE) all 2531 2532 MAKE_FRAG 2533 } 2534 2535=head2 The End Of Cargo Cult Programming 2536 2537WriteMakefile() now does some basic sanity checks on its parameters to 2538protect against typos and malformatted values. This means some things 2539which happened to work in the past will now throw warnings and 2540possibly produce internal errors. 2541 2542Some of the most common mistakes: 2543 2544=over 2 2545 2546=item C<< MAN3PODS => ' ' >> 2547 2548This is commonly used to suppress the creation of man pages. MAN3PODS 2549takes a hash ref not a string, but the above worked by accident in old 2550versions of MakeMaker. 2551 2552The correct code is C<< MAN3PODS => { } >>. 2553 2554=back 2555 2556 2557=head2 Hintsfile support 2558 2559MakeMaker.pm uses the architecture specific information from 2560Config.pm. In addition it evaluates architecture specific hints files 2561in a C<hints/> directory. The hints files are expected to be named 2562like their counterparts in C<PERL_SRC/hints>, but with an C<.pl> file 2563name extension (eg. C<next_3_2.pl>). They are simply C<eval>ed by 2564MakeMaker within the WriteMakefile() subroutine, and can be used to 2565execute commands as well as to include special variables. The rules 2566which hintsfile is chosen are the same as in Configure. 2567 2568The hintsfile is eval()ed immediately after the arguments given to 2569WriteMakefile are stuffed into a hash reference $self but before this 2570reference becomes blessed. So if you want to do the equivalent to 2571override or create an attribute you would say something like 2572 2573 $self->{LIBS} = ['-ldbm -lucb -lc']; 2574 2575=head2 Distribution Support 2576 2577For authors of extensions MakeMaker provides several Makefile 2578targets. Most of the support comes from the ExtUtils::Manifest module, 2579where additional documentation can be found. 2580 2581=over 4 2582 2583=item make distcheck 2584 2585reports which files are below the build directory but not in the 2586MANIFEST file and vice versa. (See ExtUtils::Manifest::fullcheck() for 2587details) 2588 2589=item make skipcheck 2590 2591reports which files are skipped due to the entries in the 2592C<MANIFEST.SKIP> file (See ExtUtils::Manifest::skipcheck() for 2593details) 2594 2595=item make distclean 2596 2597does a realclean first and then the distcheck. Note that this is not 2598needed to build a new distribution as long as you are sure that the 2599MANIFEST file is ok. 2600 2601=item make manifest 2602 2603rewrites the MANIFEST file, adding all remaining files found (See 2604ExtUtils::Manifest::mkmanifest() for details) 2605 2606=item make distdir 2607 2608Copies all the files that are in the MANIFEST file to a newly created 2609directory with the name C<$(DISTNAME)-$(VERSION)>. If that directory 2610exists, it will be removed first. 2611 2612Additionally, it will create a META.yml module meta-data file in the 2613distdir and add this to the distdir's MANIFEST. You can shut this 2614behavior off with the NO_META flag. 2615 2616=item make disttest 2617 2618Makes a distdir first, and runs a C<perl Makefile.PL>, a make, and 2619a make test in that directory. 2620 2621=item make tardist 2622 2623First does a distdir. Then a command $(PREOP) which defaults to a null 2624command, followed by $(TO_UNIX), which defaults to a null command under 2625UNIX, and will convert files in distribution directory to UNIX format 2626otherwise. Next it runs C<tar> on that directory into a tarfile and 2627deletes the directory. Finishes with a command $(POSTOP) which 2628defaults to a null command. 2629 2630=item make dist 2631 2632Defaults to $(DIST_DEFAULT) which in turn defaults to tardist. 2633 2634=item make uutardist 2635 2636Runs a tardist first and uuencodes the tarfile. 2637 2638=item make shdist 2639 2640First does a distdir. Then a command $(PREOP) which defaults to a null 2641command. Next it runs C<shar> on that directory into a sharfile and 2642deletes the intermediate directory again. Finishes with a command 2643$(POSTOP) which defaults to a null command. Note: For shdist to work 2644properly a C<shar> program that can handle directories is mandatory. 2645 2646=item make zipdist 2647 2648First does a distdir. Then a command $(PREOP) which defaults to a null 2649command. Runs C<$(ZIP) $(ZIPFLAGS)> on that directory into a 2650zipfile. Then deletes that directory. Finishes with a command 2651$(POSTOP) which defaults to a null command. 2652 2653=item make ci 2654 2655Does a $(CI) and a $(RCS_LABEL) on all files in the MANIFEST file. 2656 2657=back 2658 2659Customization of the dist targets can be done by specifying a hash 2660reference to the dist attribute of the WriteMakefile call. The 2661following parameters are recognized: 2662 2663 CI ('ci -u') 2664 COMPRESS ('gzip --best') 2665 POSTOP ('@ :') 2666 PREOP ('@ :') 2667 TO_UNIX (depends on the system) 2668 RCS_LABEL ('rcs -q -Nv$(VERSION_SYM):') 2669 SHAR ('shar') 2670 SUFFIX ('.gz') 2671 TAR ('tar') 2672 TARFLAGS ('cvf') 2673 ZIP ('zip') 2674 ZIPFLAGS ('-r') 2675 2676An example: 2677 2678 WriteMakefile( 2679 ...other options... 2680 dist => { 2681 COMPRESS => "bzip2", 2682 SUFFIX => ".bz2" 2683 } 2684 ); 2685 2686 2687=head2 Module Meta-Data 2688 2689Long plaguing users of MakeMaker based modules has been the problem of 2690getting basic information about the module out of the sources 2691I<without> running the F<Makefile.PL> and doing a bunch of messy 2692heuristics on the resulting F<Makefile>. To this end a simple module 2693meta-data file has been introduced, F<META.yml>. 2694 2695F<META.yml> is a YAML document (see http://www.yaml.org) containing 2696basic information about the module (name, version, prerequisites...) 2697in an easy to read format. The format is developed and defined by the 2698Module::Build developers (see 2699http://module-build.sourceforge.net/META-spec.html) 2700 2701MakeMaker will automatically generate a F<META.yml> file for you and 2702add it to your F<MANIFEST> as part of the 'distdir' target (and thus 2703the 'dist' target). This is intended to seamlessly and rapidly 2704populate CPAN with module meta-data. If you wish to shut this feature 2705off, set the C<NO_META> C<WriteMakefile()> flag to true. 2706 2707 2708=head2 Disabling an extension 2709 2710If some events detected in F<Makefile.PL> imply that there is no way 2711to create the Module, but this is a normal state of things, then you 2712can create a F<Makefile> which does nothing, but succeeds on all the 2713"usual" build targets. To do so, use 2714 2715 use ExtUtils::MakeMaker qw(WriteEmptyMakefile); 2716 WriteEmptyMakefile(); 2717 2718instead of WriteMakefile(). 2719 2720This may be useful if other modules expect this module to be I<built> 2721OK, as opposed to I<work> OK (say, this system-dependent module builds 2722in a subdirectory of some other distribution, or is listed as a 2723dependency in a CPAN::Bundle, but the functionality is supported by 2724different means on the current architecture). 2725 2726=head2 Other Handy Functions 2727 2728=over 4 2729 2730=item prompt 2731 2732 my $value = prompt($message); 2733 my $value = prompt($message, $default); 2734 2735The C<prompt()> function provides an easy way to request user input 2736used to write a makefile. It displays the $message as a prompt for 2737input. If a $default is provided it will be used as a default. The 2738function returns the $value selected by the user. 2739 2740If C<prompt()> detects that it is not running interactively and there 2741is nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variable 2742is set to true, the $default will be used without prompting. This 2743prevents automated processes from blocking on user input. 2744 2745If no $default is provided an empty string will be used instead. 2746 2747=back 2748 2749 2750=head1 ENVIRONMENT 2751 2752=over 4 2753 2754=item PERL_MM_OPT 2755 2756Command line options used by C<MakeMaker-E<gt>new()>, and thus by 2757C<WriteMakefile()>. The string is split on whitespace, and the result 2758is processed before any actual command line arguments are processed. 2759 2760=item PERL_MM_USE_DEFAULT 2761 2762If set to a true value then MakeMaker's prompt function will 2763always return the default without waiting for user input. 2764 2765=item PERL_CORE 2766 2767Same as the PERL_CORE parameter. The parameter overrides this. 2768 2769=back 2770 2771=head1 SEE ALSO 2772 2773L<Module::Build> is a pure-Perl alternative to MakeMaker which does 2774not rely on make or any other external utility. It is easier to 2775extend to suit your needs. 2776 2777L<Module::Install> is a wrapper around MakeMaker which adds features 2778not normally available. 2779 2780L<ExtUtils::ModuleMaker> and L<Module::Starter> are both modules to 2781help you setup your distribution. 2782 2783=head1 AUTHORS 2784 2785Andy Dougherty C<doughera@lafayette.edu>, Andreas KE<ouml>nig 2786C<andreas.koenig@mind.de>, Tim Bunce C<timb@cpan.org>. VMS 2787support by Charles Bailey C<bailey@newman.upenn.edu>. OS/2 support 2788by Ilya Zakharevich C<ilya@math.ohio-state.edu>. 2789 2790Currently maintained by Michael G Schwern C<schwern@pobox.com> 2791 2792Send patches and ideas to C<makemaker@perl.org>. 2793 2794Send bug reports via http://rt.cpan.org/. Please send your 2795generated Makefile along with your report. 2796 2797For more up-to-date information, see L<http://www.makemaker.org>. 2798 2799=head1 LICENSE 2800 2801This program is free software; you can redistribute it and/or 2802modify it under the same terms as Perl itself. 2803 2804See L<http://www.perl.com/perl/misc/Artistic.html> 2805 2806 2807=cut 2808