-BEGIN {require 5.004;}
-
package ExtUtils::MakeMaker;
-$VERSION = "5.54_01";
+BEGIN {require 5.005_03;}
+
+$VERSION = "6.03";
$Version_OK = "5.49"; # Makefiles older than $Version_OK will die
# (Will be checked from MakeMaker version 4.13 onwards)
-($Revision = substr(q$Revision: 1.23 $, 10)) =~ s/\s+$//;
+($Revision = substr(q$Revision: 1.63 $, 10)) =~ s/\s+$//;
require Exporter;
use Config;
use vars qw(
@ISA @EXPORT @EXPORT_OK
$ISA_TTY $Revision $VERSION $Verbose $Version_OK %Config
- %Keep_after_flush %MM_Sections @Prepend_dot_dot
+ %Keep_after_flush %MM_Sections @Prepend_parent
%Recognized_Att_Keys @Get_from_Config @MM_Sections @Overridable
@Parent $PACKNAME
);
require ExtUtils::MM; # Things like CPAN assume loading ExtUtils::MakeMaker
# will give them MM.
-sub warnhandler {
- $_[0] =~ /^Use of uninitialized value/ && return;
- $_[0] =~ /used only once/ && return;
- $_[0] =~ /^Subroutine\s+[\w:]+\s+redefined/ && return;
- warn @_;
-}
+require ExtUtils::MY; # XXX pre-5.8 versions of ExtUtils::Embed expect
+ # loading ExtUtils::MakeMaker will give them MY.
+ # This will go when Embed is it's own CPAN module.
+
sub WriteMakefile {
Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
- local $SIG{__WARN__} = \&warnhandler;
require ExtUtils::MY;
my %att = @_;
- MM->new(\%att)->flush;
+
+ _verify_att(\%att);
+
+ my $mm = MM->new(\%att);
+ $mm->flush;
+
+ return $mm;
+}
+
+
+# Basic signatures of the attributes WriteMakefile takes. Each is the
+# reference type. Empty value indicate it takes a non-reference
+# scalar.
+my %Att_Sigs =
+(
+ ABSTRACT => '',
+ ABSTRACT_FROM => '',
+ AUTHOR => '',
+ BINARY_LOCATION => '',
+ C => 'array',
+ CCFLAGS => '',
+ CONFIG => 'array',
+ CONFIGURE => 'code',
+ DEFINE => '',
+ DIR => 'array',
+ DISTNAME => '',
+ DL_FUNCS => 'hash',
+ DL_VARS => 'array',
+ EXCLUDE_EXT => 'array',
+ EXE_FILES => 'array',
+ FIRST_MAKEFILE => '',
+ FULLPERL => '',
+ FULLPERLRUN => '',
+ FULLPERLRUNINST => '',
+ FUNCLIST => 'array',
+ H => 'array',
+ IMPORTS => 'hash',
+ INC => '',
+ INCLUDE_EXT => 'array',
+ INSTALLARCHLIB => '',
+ INSTALLBIN => '',
+ INSTALLDIRS => '',
+ INSTALLMAN1DIR => '',
+ INSTALLMAN3DIR => '',
+ INSTALLPRIVLIB => '',
+ INSTALLSCRIPT => '',
+ INSTALLSITEARCH => '',
+ INSTALLSITEBIN => '',
+ INSTALLSITELIB => '',
+ INSTALLSITEMAN1DIR => '',
+ INSTALLSITEMAN3DIR => '',
+ INSTALLVENDORARCH => '',
+ INSTALLVENDORBIN => '',
+ INSTALLVENDORLIB => '',
+ INSTALLVENDORMAN1DIR => '',
+ INSTALLVENDORMAN3DIR => '',
+ INST_ARCHLIB => '',
+ INST_BIN => '',
+ INST_LIB => '',
+ INST_MAN1DIR => '',
+ INST_MAN3DIR => '',
+ INST_SCRIPT => '',
+ _KEEP_AFTER_FLUSH => '',
+ LDDLFLAGS => '',
+ LDFROM => '',
+ LIB => '',
+ LIBPERL_A => '',
+ LIBS => ['array',''],
+ LINKTYPE => '',
+ MAKEAPERL => '',
+ MAKEFILE => '',
+ MAN1PODS => 'hash',
+ MAN3PODS => 'hash',
+ MAP_TARGET => '',
+ MYEXTLIB => '',
+ NAME => '',
+ NEEDS_LINKING => '',
+ NOECHO => '',
+ NORECURS => '',
+ NO_VC => '',
+ OBJECT => '',
+ OPTIMIZE => '',
+ PERL => '',
+ PERL_CORE => '',
+ PERLMAINCC => '',
+ PERL_ARCHLIB => '',
+ PERL_LIB => '',
+ PERL_MALLOC_OK => '',
+ PERLRUN => '',
+ PERLRUNINST => '',
+ PERL_SRC => '',
+ PERM_RW => '',
+ PERM_RWX => '',
+ PL_FILES => 'hash',
+ PM => 'hash',
+ PMLIBDIRS => 'array',
+ PM_FILTER => '',
+ POLLUTE => '',
+ PPM_INSTALL_EXEC => '',
+ PPM_INSTALL_SCRIPT => '',
+ PREFIX => '',
+ PREREQ_FATAL => '',
+ PREREQ_PM => 'hash',
+ PREREQ_PRINT => '',
+ PRINT_PREREQ => '',
+ SITEPREFIX => '',
+ SKIP => 'array',
+ TYPEMAPS => 'array',
+ VENDORPREFIX => '',
+ VERBINST => '',
+ VERSION => '',
+ VERSION_FROM => '',
+ XS => 'hash',
+ XSOPT => '',
+ XSPROTOARG => '',
+ XS_VERSION => '',
+
+ clean => 'hash',
+ depend => 'hash',
+ dist => 'hash',
+ dynamic_lib=> 'hash',
+ linkext => 'hash',
+ macro => 'hash',
+ realclean => 'hash',
+ test => 'hash',
+ tool_autosplit => 'hash',
+);
+
+
+sub _verify_att {
+ my($att) = @_;
+
+ while( my($key, $val) = each %$att ) {
+ my $sig = $Att_Sigs{$key};
+ unless( defined $sig ) {
+ warn "WARNING: $key is not a known parameter.\n";
+ next;
+ }
+
+ my @sigs = ref $sig ? @$sig : $sig;
+ my $given = lc ref $val;
+ unless( grep $given eq $_, @sigs ) {
+ my $takes = join " or ", map { $_ ne '' ? "$_ reference"
+ : "string/number"
+ } @sigs;
+ my $has = $given ne '' ? "$given reference"
+ : "string/number";
+ warn "WARNING: $key takes a $takes not a $has.\n".
+ " Please inform the author.\n";
+ }
+ }
}
sub prompt ($;$) {
my($mess,$def)=@_;
$ISA_TTY = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ; # Pipe?
- Carp::confess("prompt function called without an argument") unless defined $mess;
+ Carp::confess("prompt function called without an argument")
+ unless defined $mess;
my $dispdef = defined $def ? "[$def] " : " ";
$def = defined $def ? $def : "";
my $ans;
sub eval_in_subdirs {
my($self) = @_;
use Cwd qw(cwd abs_path);
- my $pwd = cwd();
+ my $pwd = cwd() || die "Can't figure out your cwd!";
+
local @INC = map eval {abs_path($_) if -e} || $_, @INC;
push @INC, '.'; # '.' has to always be at the end of @INC
# } else {
# warn "WARNING from evaluation of $dir/Makefile.PL: $@";
# }
- warn "WARNING from evaluation of $dir/Makefile.PL: $@";
+ die "ERROR from evaluation of $dir/Makefile.PL: $@";
}
}
EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE
FULLPERL FULLPERLRUN FULLPERLRUNINST
FUNCLIST H IMPORTS
- INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS
- INSTALLMAN1DIR
- INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH
- INSTALLSITELIB INST_ARCHLIB INST_BIN INST_EXE INST_LIB
- INST_MAN1DIR INST_MAN3DIR INST_SCRIPT LDFROM LIB LIBPERL_A LIBS
+ INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR
+ INSTALLDIRS
+ PREFIX SITEPREFIX VENDORPREFIX
+ INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB
+ INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH
+ INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN
+ INSTALLMAN1DIR INSTALLMAN3DIR
+ INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR
+ INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR
+ INSTALLSCRIPT
+ PERL_LIB PERL_ARCHLIB
+ SITELIBEXP SITEARCHEXP
+ INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS
LINKTYPE MAKEAPERL MAKEFILE MAN1PODS MAN3PODS MAP_TARGET MYEXTLIB
PERL_MALLOC_OK
NAME NEEDS_LINKING NOECHO NORECURS NO_VC OBJECT OPTIMIZE PERL PERLMAINCC
- PERLRUN PERLRUNINST PERL_ARCHLIB PERL_CORE
- PERL_LIB PERL_SRC PERM_RW PERM_RWX
+ PERLRUN PERLRUNINST PERL_CORE
+ PERL_SRC PERM_RW PERM_RWX
PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC
- PPM_INSTALL_SCRIPT PREFIX
- PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
- SKIP TEST_LIBS TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
+ PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
+ SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
tool_autosplit
MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC
# us (the parent) for the values and will prepend "..", so that
# all files to be installed end up below OUR ./blib
#
- @Prepend_dot_dot = qw(
- INST_BIN INST_EXE INST_LIB INST_ARCHLIB INST_SCRIPT
+ @Prepend_parent = qw(
+ INST_BIN INST_LIB INST_ARCHLIB INST_SCRIPT
MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC
PERL FULLPERL
);
foreach my $prereq (sort keys %{$self->{PREREQ_PM}}) {
eval "require $prereq";
+ my $pr_version = $prereq->VERSION || 0;
+
if ($@) {
warn sprintf "Warning: prerequisite %s %s not found.\n",
$prereq, $self->{PREREQ_PM}{$prereq}
unless $self->{PREREQ_FATAL};
$unsatisfied{$prereq} = 'not installed';
- } elsif ($prereq->VERSION < $self->{PREREQ_PM}->{$prereq} ){
- warn "Warning: prerequisite %s %s not found. We have %s.\n",
+ } elsif ($pr_version < $self->{PREREQ_PM}->{$prereq} ){
+ warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n",
$prereq, $self->{PREREQ_PM}{$prereq},
- ($prereq->VERSION || 'unknown version')
+ ($pr_version || 'unknown version')
unless $self->{PREREQ_FATAL};
$unsatisfied{$prereq} = $self->{PREREQ_PM}->{$prereq} ?
$self->{PREREQ_PM}->{$prereq} : 'unknown version' ;
if (defined $Parent[-2]){
$self->{PARENT} = $Parent[-2];
my $key;
- for $key (@Prepend_dot_dot) {
+ for $key (@Prepend_parent) {
next unless defined $self->{PARENT}{$key};
$self->{$key} = $self->{PARENT}{$key};
unless ($^O eq 'VMS' && $key =~ /PERL$/) {
$self->init_dirscan();
$self->init_others();
+ $self->init_PERM();
my($argv) = neatvalue(\@ARGV);
$argv =~ s/^\[/(/;
$argv =~ s/\]$/)/;
sub WriteEmptyMakefile {
Carp::croak "WriteEmptyMakefile: Need even number of args" if @_ % 2;
- local $SIG{__WARN__} = \&warnhandler;
my %att = @_;
my $self = MM->new(\%att);
rename $self->{MAKEFILE}, "$self->{MAKEFILE}.old"
or warn "rename $self->{MAKEFILE} $self->{MAKEFILE}.old: $!"
if -f $self->{MAKEFILE};
- open MF, '>', $self->{MAKEFILE} or die "open $self->{MAKEFILE} for write: $!";
+ open MF, '>'.$self->{MAKEFILE} or die "open $self->{MAKEFILE} for write: $!";
print MF <<'EOP';
all:
}
sub _run_hintfile {
- our $self;
+ no strict 'vars';
local($self) = shift; # make $self available to the hint file.
my($hint_file) = shift;
# still trying to reduce the list to some reasonable minimum --
# because I want to make it easier for the user. A.K.
+ local $SIG{__WARN__} = sub {
+ # can't use 'no warnings redefined', 5.6 only
+ warn @_ unless $_[0] =~ /^Subroutine .* redefined/
+ };
foreach my $method (@Overridable) {
# We cannot say "next" here. Nick might call MY->makeaperl
sub flush {
my $self = shift;
my($chunk);
-# use FileHandle ();
-# my $fh = new FileHandle;
local *FH;
print STDOUT "Writing $self->{MAKEFILE} for $self->{NAME}\n";
unlink($self->{MAKEFILE}, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : '');
-# $fh->open(">MakeMaker.tmp") or die "Unable to open MakeMaker.tmp: $!";
open(FH,">MakeMaker.tmp") or die "Unable to open MakeMaker.tmp: $!";
for $chunk (@{$self->{RESULT}}) {
-# print $fh "$chunk\n";
print FH "$chunk\n";
}
-# $fh->close;
close FH;
my($finalname) = $self->{MAKEFILE};
rename("MakeMaker.tmp", $finalname);
chmod 0644, $finalname unless $Is_VMS;
- if ($self->{PARENT}) {
+ if ($self->{PARENT} && !$self->{_KEEP_AFTER_FLUSH}) {
foreach (keys %$self) { # safe memory
delete $self->{$_} unless $Keep_after_flush{$_};
}
=head1 SYNOPSIS
-C<use ExtUtils::MakeMaker;>
-
-C<WriteMakefile( ATTRIBUTE =E<gt> VALUE [, ...] );>
+ use ExtUtils::MakeMaker;
-which is really
-
-C<MM-E<gt>new(\%att)-E<gt>flush;>
+ WriteMakefile( ATTRIBUTE => VALUE [, ...] );
=head1 DESCRIPTION
it wishes to have written to the Makefile.
MakeMaker is object oriented. Each directory below the current
-directory that contains a Makefile.PL. Is treated as a separate
+directory that contains a Makefile.PL is treated as a separate
object. This makes it possible to write an unlimited number of
Makefiles with a single invocation of WriteMakefile().
=head2 make test
MakeMaker checks for the existence of a file named F<test.pl> in the
-current directory and if it exists it adds commands to the test target
-of the generated Makefile that will execute the script with the proper
-set of perl C<-I> options.
+current directory and if it exists it execute the script with the
+proper set of perl C<-I> options.
MakeMaker also checks for any files matching glob("t/*.t"). It will
-add commands to the test target of the generated Makefile that execute
-all matching files via the L<Test::Harness> module with the C<-I>
-switches set correctly.
+execute all matching files in alphabetical order via the
+L<Test::Harness> module with the C<-I> switches set correctly.
+
+If you'd like to see the raw output of your tests, set the
+C<TEST_VERBOSE> variable to true.
+
+ make test TEST_VERBOSE=1
=head2 make testdb
test under the Perl debugger (see L<perldebug>). If the file
F<test.pl> exists in the current directory, it is used for the test.
-If you want to debug some other testfile, set C<TEST_FILE> variable
+If you want to debug some other testfile, set the C<TEST_FILE> variable
thusly:
make testdb TEST_FILE=t/mytest.t
By default the debugger is called using C<-d> option to perl. If you
-want to specify some other option, set C<TESTDB_SW> variable:
+want to specify some other option, set the C<TESTDB_SW> variable:
make testdb TESTDB_SW=-Dx
INSTALLDIRS according to the following table:
INSTALLDIRS set to
- perl site
+ perl site vendor
- INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH
- INST_LIB INSTALLPRIVLIB INSTALLSITELIB
- INST_BIN INSTALLBIN
- INST_SCRIPT INSTALLSCRIPT
- INST_MAN1DIR INSTALLMAN1DIR
- INST_MAN3DIR INSTALLMAN3DIR
+ PREFIX SITEPREFIX VENDORPREFIX
+ INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH
+ INST_LIB INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB
+ INST_BIN INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN
+ INST_SCRIPT INSTALLSCRIPT INSTALLSCRIPT INSTALLSCRIPT
+ INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR INSTALLVENDORMAN1DIR
+ INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR INSTALLVENDORMAN3DIR
The INSTALL... macros in turn default to their %Config
($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts.
INSTALLSCRIPT, etc. will be appropriate, and this incantation will be
the best:
- perl Makefile.PL; make; make test
+ perl Makefile.PL;
+ make;
+ make test
make install
make install per default writes some documentation of what has been
=head2 Using Attributes and Parameters
-The following attributes can be specified as arguments to WriteMakefile()
-or as NAME=VALUE pairs on the command line:
+The following attributes may be specified as arguments to WriteMakefile()
+or as NAME=VALUE pairs on the command line.
=over 2
=item IMPORTS
This attribute is used to specify names to be imported into the
-extension. It is only used on OS/2 and Win32.
+extension. Takes a hash ref.
+
+It is only used on OS/2 and Win32.
=item INC
=item INSTALLBIN
-Directory to install binary files (e.g. tkperl) into.
+Directory to install binary files (e.g. tkperl) into if
+INSTALLDIRS=perl.
=item INSTALLDIRS
-Determines which of the two sets of installation directories to
-choose: installprivlib and installarchlib versus installsitelib and
-installsitearch. The first pair is chosen with INSTALLDIRS=perl, the
-second with INSTALLDIRS=site. Default is site.
+Determines which of the sets of installation directories to choose:
+perl, site or vendor. Defaults to site.
=item INSTALLMAN1DIR
-This directory gets the man pages at 'make install' time. Defaults to
-$Config{installman1dir}.
-
=item INSTALLMAN3DIR
-This directory gets the man pages at 'make install' time. Defaults to
-$Config{installman3dir}.
+These directories get the man pages at 'make install' time if
+INSTALLDIRS=perl. Defaults to $Config{installman*dir}.
+
+If set to 'none', no man pages will be installed.
=item INSTALLPRIVLIB
Used by 'make install', which copies files from INST_LIB to this
directory if INSTALLDIRS is set to perl.
+Defaults to $Config{installprivlib}.
+
=item INSTALLSCRIPT
Used by 'make install' which copies files from INST_SCRIPT to this
Used by 'make install', which copies files from INST_ARCHLIB to this
directory if INSTALLDIRS is set to site (default).
+=item INSTALLSITEBIN
+
+Used by 'make install', which copies files from INST_BIN to this
+directory if INSTALLDIRS is set to site (default).
+
=item INSTALLSITELIB
Used by 'make install', which copies files from INST_LIB to this
directory if INSTALLDIRS is set to site (default).
+=item INSTALLSITEMAN1DIR
+
+=item INSTALLSITEMAN3DIR
+
+These directories get the man pages at 'make install' time if
+INSTALLDIRS=site (default). Defaults to
+$(SITEPREFIX)/man/man$(MAN*EXT).
+
+If set to 'none', no man pages will be installed.
+
+=item INSTALLVENDORARCH
+
+Used by 'make install', which copies files from INST_ARCHLIB to this
+directory if INSTALLDIRS is set to vendor.
+
+=item INSTALLVENDORBIN
+
+Used by 'make install', which copies files from INST_BIN to this
+directory if INSTALLDIRS is set to vendor.
+
+=item INSTALLVENDORLIB
+
+Used by 'make install', which copies files from INST_LIB to this
+directory if INSTALLDIRS is set to vendor.
+
+=item INSTALLVENDORMAN1DIR
+
+=item INSTALLVENDORMAN3DIR
+
+These directories get the man pages at 'make install' time if
+INSTALLDIRS=vendor. Defaults to $(VENDORPREFIX)/man/man$(MAN*EXT).
+
+If set to 'none', no man pages will be installed.
+
=item INST_ARCHLIB
Same as INST_LIB for architecture dependent files.
Directory to put real binary files during 'make'. These will be copied
to INSTALLBIN during 'make install'
-=item INST_EXE
-
-Old name for INST_SCRIPT. Deprecated. Please use INST_SCRIPT if you
-need to use it.
-
=item INST_LIB
Directory where we put library files of this extension while building
testing. make install will copy the files in INST_SCRIPT to
INSTALLSCRIPT.
+=item LDDLFLAGS
+
+Any special flags that might need to be passed to ld to create a
+shared library suitable for dynamic loading. It is up to the makefile
+to use it. (See L<Config/lddlflags>)
+
+Defaults to $Config{lddlflags}.
+
=item LDFROM
-defaults to "$(OBJECT)" and is used in the ld command to specify
+Defaults to "$(OBJECT)" and is used in the ld command to specify
what files to link/load from (also see dynamic_lib below for how to
specify ld flags)
If you specify LIB or any INSTALL* variables they will not be effected
by the PREFIX.
-=item PREREQ_PM
-
-Hashref: Names of modules that need to be available to run this
-extension (e.g. Fcntl for SDBM_File) are the keys of the hash and the
-desired version is the value. If the required version number is 0, we
-only check if any version is installed already.
+Defaults to $Config{installprefixexp}.
=item PREREQ_FATAL
It is I<extremely> rare to have to use C<PREREQ_FATAL> at all!
+=item PREREQ_PM
+
+Hashref: Names of modules that need to be available to run this
+extension (e.g. Fcntl for SDBM_File) are the keys of the hash and the
+desired version is the value. If the required version number is 0, we
+only check if any version is installed already.
+
=item PREREQ_PRINT
Bool. If this parameter is true, the prerequisites will be printed to
perl(A::B)>=Vers1 perl(C::D)>=Vers2 ...
+=item SITEPREFIX
+
+Like PREFIX, but only for the site install locations.
+
+Defaults to PREFIX (if set) or $Config{siteprefixexp}. Perls prior to
+5.6.0 didn't have an explicit siteprefix in the Config. In those
+cases $Config{installprefix} will be used.
+
=item SKIP
Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the
speedup. It may seriously damage the resulting Makefile. Only use it
if you really need it.
-=item TEST_LIBS
-
-The set of -I's necessary to run a "make test". Use as:
-$(PERL) $(TEST_LIBS) -e '...' for example.
-
-The paths will be absolute.
-
=item TYPEMAPS
Ref to array of typemap file names. Use this when the typemaps are
precedence, even if it isn't listed in TYPEMAPS. The default system
typemap has lowest precedence.
+=item VENDORPREFIX
+
+Like PREFIX, but only for the vendor install locations.
+
+Defaults to PREFIX (if set) or $Config{vendorprefixexp}
+
+=item VERBINST
+
+If true, make install will be verbose
+
=item VERSION
Your version number for distributing the package. This defaults to
$VERSION = '1.00';
*VERSION = \'1.01';
- ( $VERSION ) = '$Revision: 1.23 $ ' =~ /\$Revision:\s+([^\s]+)/;
+ ( $VERSION ) = '$Revision: 1.63 $ ' =~ /\$Revision:\s+([^\s]+)/;
$FOO::VERSION = '1.10';
*FOO::VERSION = \'1.11';
our $VERSION = 1.2.3; # new for perl5.6.0
If you cannot achieve the desired Makefile behaviour by specifying
attributes you may define private subroutines in the Makefile.PL.
-Each subroutines returns the text it wishes to have written to
+Each subroutine returns the text it wishes to have written to
the Makefile. To override a section of the Makefile you can
either say:
or you can edit the default by saying something like:
- sub MY::c_o {
- package MY; # so that "SUPER" works right
+ package MY; # so that "SUPER" works right
+ sub c_o {
my $inherited = shift->SUPER::c_o(@_);
$inherited =~ s/old text/new text/;
$inherited;
If you still need a different solution, try to develop another
subroutine that fits your needs and submit the diffs to
-F<perl5-porters@perl.org> or F<comp.lang.perl.moderated> as appropriate.
+F<makemaker@perl.org>
-For a complete description of all MakeMaker methods see L<ExtUtils::MM_Unix>.
+For a complete description of all MakeMaker methods see
+L<ExtUtils::MM_Unix>.
Here is a simple example of how to add a new target to the generated
Makefile:
sub MY::postamble {
- '
+ return <<'MAKE_FRAG';
$(MYEXTLIB): sdbm/Makefile
cd sdbm && $(MAKE) all
- ';
+
+ MAKE_FRAG
}
+=head2 The End Of Cargo Cult Programming
+
+WriteMakefile() now does some basic sanity checks on its parameters to
+protect against typos and malformatted values. This means some things
+which happened to work in the past will now throw warnings and
+possibly produce internal errors.
+
+Some of the most common mistakes:
+
+=over 2
+
+=item C<<MAN3PODS => ' '>>
+
+This is commonly used to supress the creation of man pages. MAN3PODS
+takes a hash ref not a string, but the above worked by accident in old
+versions of MakeMaker.
+
+The correct code is C<<MAN3PODS => { }>>.
+
+=back
+
=head2 Hintsfile support
=head1 AUTHORS
-Andy Dougherty <F<doughera@lafcol.lafayette.edu>>, Andreas KE<ouml>nig
-<F<andreas.koenig@mind.de>>, Tim Bunce <F<Tim.Bunce@ig.co.uk>>. VMS
+Andy Dougherty <F<doughera@lafayette.edu>>, Andreas KE<ouml>nig
+<F<andreas.koenig@mind.de>>, Tim Bunce <F<timb@cpan.org>>. VMS
support by Charles Bailey <F<bailey@newman.upenn.edu>>. OS/2 support
by Ilya Zakharevich <F<ilya@math.ohio-state.edu>>.
Send patches and ideas to <F<makemaker@perl.org>>.
-Send bug reports via http://rt.cpan.org/.
+Send bug reports via http://rt.cpan.org/. Please send your
+generated Makefile along with your report.
+
+For more up-to-date information, see http://www.makemaker.org.
=cut