X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExtUtils%2FMakeMaker.pm;h=13bb85012933b1a3c35f65b94ec3c7a51c798984;hb=919b8535db3a1743970d092ccde72289af606b22;hp=67fb3e7792c8aa822efbfc66614fcb8c90ad4cfe;hpb=dedf98bc6289c70e2368bc395e2ec91fed11fc33;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 67fb3e7..13bb850 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -2,8 +2,8 @@ package ExtUtils::MakeMaker; BEGIN {require 5.005_03;} -$VERSION = '6.10_02'; -($Revision = substr(q$Revision: 1.108 $, 10)) =~ s/\s+$//; +$VERSION = '6.16'; +($Revision) = q$Revision: 1.131 $ =~ /Revision:\s+(\S+)/; require Exporter; use Config; @@ -92,6 +92,7 @@ my %Special_Sigs = ( dynamic_lib=> 'hash', linkext => 'hash', macro => 'hash', + postamble => 'hash', realclean => 'hash', test => 'hash', tool_autosplit => 'hash', @@ -203,6 +204,7 @@ sub full_setup { EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE FULLPERL FULLPERLRUN FULLPERLRUNINST FUNCLIST H IMPORTS + INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR INSTALLDIRS DESTDIR PREFIX @@ -216,18 +218,18 @@ sub full_setup { INSTALLSCRIPT PERL_LIB PERL_ARCHLIB SITELIBEXP SITEARCHEXP + INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS - LINKTYPE MAKEAPERL MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET - MYEXTLIB - PERL_MALLOC_OK - NAME NEEDS_LINKING NOECHO NORECURS NO_VC OBJECT OPTIMIZE PERL PERLMAINCC - PERLRUN PERLRUNINST PERL_CORE + LINKTYPE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET + MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NORECURS NO_VC OBJECT OPTIMIZE + PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE PERL_SRC PERM_RW PERM_RWX PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC 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 MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED /; @@ -352,11 +354,13 @@ sub new { if ("@ARGV" =~ /\bPREREQ_PRINT\b/) { require Data::Dumper; print Data::Dumper->Dump([$self->{PREREQ_PM}], [qw(PREREQ_PM)]); + exit 0; } # PRINT_PREREQ is RedHatism. if ("@ARGV" =~ /\bPRINT_PREREQ\b/) { - print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " } sort keys %{$self->{PREREQ_PM}}), "\n"; + print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " } + sort keys %{$self->{PREREQ_PM}}), "\n"; exit 0; } @@ -435,7 +439,13 @@ sub new { my $key; for $key (@Prepend_parent) { next unless defined $self->{PARENT}{$key}; + + # Don't stomp on WriteMakefile() args. + next if defined $self->{ARGS}{$key} and + $self->{ARGS}{$key} eq $self->{$key}; + $self->{$key} = $self->{PARENT}{$key}; + unless ($Is_VMS && $key =~ /PERL$/) { $self->{$key} = $self->catdir("..",$self->{$key}) unless $self->file_name_is_absolute($self->{$key}); @@ -477,6 +487,7 @@ sub new { $self->init_dist; $self->init_INST; $self->init_INSTALL; + $self->init_DEST; $self->init_dirscan; $self->init_xs; $self->init_PERL; @@ -1345,12 +1356,13 @@ Something like C<"-DHAVE_UNISTD_H"> This is the root directory into which the code will be installed. It I. For example, if your code -would normally go into /usr/local/lib/perl you could set DESTDIR=/tmp +would normally go into /usr/local/lib/perl you could set DESTDIR=/tmp/ and installation would go into /tmp/usr/local/lib/perl. This is primarily of use for people who repackage Perl modules. -From the GNU Makefile conventions. +NOTE: Due to the nature of make, it is important that you put the trailing +slash on your DESTDIR. "/tmp/" not "/tmp". =item DIR @@ -1418,6 +1430,11 @@ Ref to array of executable files. The files will be copied to the INST_SCRIPT directory. Make realclean will delete them from there again. +If your executables start with something like #!perl or +#!/usr/bin/perl MakeMaker will change this to the path of the perl +'Makefile.PL' was invoked with so the programs will be sure to run +properly even if perl is not in /usr/bin/perl. + =item FIRST_MAKEFILE The name of the Makefile to be produced. This is used for the second @@ -1715,6 +1732,13 @@ Defaults to C<@>. Boolean. Attribute to inhibit descending into subdirectories. +=item NO_META + +When true, suppresses the generation and addition to the MANIFEST of +the META.yml module meta-data file during 'make distdir'. + +Defaults to false. + =item NO_VC In general, any generated Makefile checks for the current version of @@ -1943,7 +1967,8 @@ only check if any version is installed already. =item PREREQ_PRINT Bool. If this parameter is true, the prerequisites will be printed to -stdout and MakeMaker will exit. The output format is +stdout and MakeMaker will exit. The output format is an evalable hash +ref. $PREREQ_PM = { 'A::B' => Vers1, @@ -2016,7 +2041,7 @@ MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; - ( $VERSION ) = '$Revision: 1.108 $ ' =~ /\$Revision:\s+([^\s]+)/; + $VERSION = sprintf "%d.%03d", q$Revision: 1.131 $ =~ /(\d+)/g; $FOO::VERSION = '1.10'; *FOO::VERSION = \'1.11'; our $VERSION = 1.2.3; # new for perl5.6.0 @@ -2076,7 +2101,8 @@ to the value of the VERSION attribute. =head2 Additional lowercase attributes can be used to pass parameters to the methods which implement that -part of the Makefile. +part of the Makefile. Parameters are specified as a hash ref but are +passed to the method as a hash. =over 2 @@ -2123,6 +2149,10 @@ be linked. {ANY_MACRO => ANY_VALUE, ...} +=item postamble + +Anything put here will be passed to MY::postamble() if you have one. + =item realclean {FILES => '$(INST_ARCHAUTODIR)/*.xyz'} @@ -2256,6 +2286,10 @@ Copies all the files that are in the MANIFEST file to a newly created directory with the name C<$(DISTNAME)-$(VERSION)>. If that directory exists, it will be removed first. +Additionally, it will create a META.yml module meta-data file and add +this to your MANFIEST. You can shut this behavior off with the NO_META +flag. + =item make disttest Makes a distdir first, and runs a C, a make, and @@ -2320,6 +2354,28 @@ An example: WriteMakefile( 'dist' => { COMPRESS=>"bzip2", SUFFIX=>".bz2" }) + +=head2 Module Meta-Data + +Long plaguing users of MakeMaker based modules has been the problem of +getting basic information about the module out of the sources +I running the F and doing a bunch of messy +heuristics on the resulting F. To this end a simple module +meta-data file has been introduced, F. + +F is a YAML document (see http://www.yaml.org) containing +basic information about the module (name, version, prerequisites...) +in an easy to read format. The format is developed and defined by the +Module::Build developers (see +http://module-build.sourceforge.net/META-spec.html) + +MakeMaker will automatically generate a F file for you and +add it to your F as part of the 'distdir' target (and thus +the 'dist' target). This is intended to seamlessly and rapidly +populate CPAN with module meta-data. If you wish to shut this feature +off, set the C C flag to true. + + =head2 Disabling an extension If some events detected in F imply that there is no way