From 300c1eb6d37d46078d448d6d58938d5a80cd68ff Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 23 Apr 2014 21:46:20 +0000 Subject: (tl)perl 5.18.2 for windows from siep git-svn-id: svn://tug.org/texlive/trunk@33648 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm | 174 ++++++++++++++++---------- 1 file changed, 111 insertions(+), 63 deletions(-) (limited to 'Master/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm') diff --git a/Master/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm b/Master/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm index 3885ab00f1b..f271ef79282 100644 --- a/Master/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm +++ b/Master/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm @@ -18,8 +18,8 @@ our @Overridable; my @Prepend_parent; my %Recognized_Att_Keys; -our $VERSION = '6.63_02'; -$VERSION = eval $VERSION; +our $VERSION = '6.66'; +$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] # Emulate something resembling CVS $Revision$ (our $Revision = $VERSION) =~ s{_}{}; @@ -94,6 +94,7 @@ my %Special_Sigs = ( PREREQ_PM => 'HASH', BUILD_REQUIRES => 'HASH', CONFIGURE_REQUIRES => 'HASH', + TEST_REQUIRES => 'HASH', SKIP => 'ARRAY', TYPEMAPS => 'ARRAY', XS => 'HASH', @@ -274,12 +275,13 @@ sub full_setup { INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS LICENSE LINKTYPE MAKE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET META_ADD META_MERGE MIN_PERL_VERSION BUILD_REQUIRES CONFIGURE_REQUIRES - MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NO_MYMETA NORECURS NO_VC OBJECT - OPTIMIZE PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE + MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NO_MYMETA + NORECURS NO_VC OBJECT OPTIMIZE PERL_MALLOC_OK PERL PERLMAINCC PERLRUN + PERLRUNINST PERL_CORE PERL_SRC PERM_DIR PERM_RW PERM_RWX PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ - SIGN SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG + SIGN SKIP TEST_REQUIRES TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG XS_VERSION clean depend dist dynamic_lib linkext macro realclean tool_autosplit @@ -416,7 +418,7 @@ sub new { bless $self, "MM"; # Cleanup all the module requirement bits - for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES)) { + for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES TEST_REQUIRES)) { $self->{$key} ||= {}; $self->clean_versions( $key ); } @@ -431,7 +433,7 @@ sub new { $self->_PRINT_PREREQ; } - print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose; + print "MakeMaker (v$VERSION)\n" if $Verbose; if (-f "MANIFEST" && ! -f "Makefile" && ! $ENV{PERL_CORE}){ check_manifest(); } @@ -780,7 +782,11 @@ END if ($key eq 'PREREQ_PM') { # CPAN.pm takes prereqs from this field in 'Makefile' # and does not know about BUILD_REQUIRES - $v = neatvalue({ %{ $att->{PREREQ_PM} || {} }, %{ $att->{BUILD_REQUIRES} || {} } }); + $v = neatvalue({ + %{ $att->{PREREQ_PM} || {} }, + %{ $att->{BUILD_REQUIRES} || {} }, + %{ $att->{TEST_REQUIRES} || {} }, + }); } else { $v = neatvalue($att->{$key}); } @@ -795,18 +801,18 @@ END sub check_manifest { - print STDOUT "Checking if your kit is complete...\n"; + print "Checking if your kit is complete...\n"; require ExtUtils::Manifest; # avoid warning $ExtUtils::Manifest::Quiet = $ExtUtils::Manifest::Quiet = 1; my(@missed) = ExtUtils::Manifest::manicheck(); if (@missed) { - print STDOUT "Warning: the following files are missing in your kit:\n"; + print "Warning: the following files are missing in your kit:\n"; print "\t", join "\n\t", @missed; - print STDOUT "\n"; - print STDOUT "Please inform the author.\n"; + print "\n"; + print "Please inform the author.\n"; } else { - print STDOUT "Looks good\n"; + print "Looks good\n"; } } @@ -834,9 +840,9 @@ sub parse_args{ if (defined $self->{potential_libs}){ my($msg)="'potential_libs' => '$self->{potential_libs}' should be"; if ($self->{potential_libs}){ - print STDOUT "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n"; + print "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n"; } else { - print STDOUT "$msg deleted.\n"; + print "$msg deleted.\n"; } $self->{LIBS} = [$self->{potential_libs}]; delete $self->{potential_libs}; @@ -844,14 +850,14 @@ sub parse_args{ # catch old-style 'ARMAYBE' and inform user how to 'upgrade' if (defined $self->{ARMAYBE}){ my($armaybe) = $self->{ARMAYBE}; - print STDOUT "ARMAYBE => '$armaybe' should be changed to:\n", + print "ARMAYBE => '$armaybe' should be changed to:\n", "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n"; my(%dl) = %{$self->{dynamic_lib} || {}}; $self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe}; delete $self->{ARMAYBE}; } if (defined $self->{LDTARGET}){ - print STDOUT "LDTARGET should be changed to LDFROM\n"; + print "LDTARGET should be changed to LDFROM\n"; $self->{LDFROM} = $self->{LDTARGET}; delete $self->{LDTARGET}; } @@ -873,8 +879,8 @@ sub parse_args{ foreach my $mmkey (sort keys %$self){ next if $mmkey eq 'ARGS'; - print STDOUT " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose; - print STDOUT "'$mmkey' is not a known MakeMaker parameter name.\n" + print " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose; + print "'$mmkey' is not a known MakeMaker parameter name.\n" unless exists $Recognized_Att_Keys{$mmkey}; } $| = 1 if $Verbose; @@ -915,7 +921,7 @@ sub _run_hintfile { my($hint_file) = shift; local($@, $!); - print STDERR "Processing hints file $hint_file\n"; + warn "Processing hints file $hint_file\n"; # Just in case the ./ isn't on the hint file, which File::Spec can # often strip off, we bung the curdir into @INC @@ -923,7 +929,7 @@ sub _run_hintfile { my $ret = do $hint_file; if( !defined $ret ) { my $error = $@ || $!; - print STDERR $error; + warn $error; } } @@ -993,20 +999,20 @@ sub skipcheck { my($self) = shift; my($section) = @_; if ($section eq 'dynamic') { - print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ", + print "Warning (non-fatal): Target 'dynamic' depends on targets ", "in skipped section 'dynamic_bs'\n" if $self->{SKIPHASH}{dynamic_bs} && $Verbose; - print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ", + print "Warning (non-fatal): Target 'dynamic' depends on targets ", "in skipped section 'dynamic_lib'\n" if $self->{SKIPHASH}{dynamic_lib} && $Verbose; } if ($section eq 'dynamic_lib') { - print STDOUT "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ", + print "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ", "targets in skipped section 'dynamic_bs'\n" if $self->{SKIPHASH}{dynamic_bs} && $Verbose; } if ($section eq 'static') { - print STDOUT "Warning (non-fatal): Target 'static' depends on targets ", + print "Warning (non-fatal): Target 'static' depends on targets ", "in skipped section 'static_lib'\n" if $self->{SKIPHASH}{static_lib} && $Verbose; } @@ -1018,7 +1024,7 @@ sub flush { my $self = shift; my $finalname = $self->{MAKEFILE}; - print STDOUT "Writing $finalname for $self->{NAME}\n"; + print "Writing $finalname for $self->{NAME}\n"; unlink($finalname, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : ()); open(my $fh,">", "MakeMaker.tmp") @@ -1037,8 +1043,8 @@ sub flush { unless ($self->{NO_MYMETA}) { # Write MYMETA.yml to communicate metadata up to the CPAN clients - if ( $self->write_mymeta( $self->mymeta ) ) {; - print STDOUT "Writing MYMETA.yml and MYMETA.json\n"; + if ( $self->write_mymeta( $self->mymeta ) ) { + print "Writing MYMETA.yml and MYMETA.json\n"; } } @@ -1156,7 +1162,10 @@ ExtUtils::MakeMaker - Create a module Makefile use ExtUtils::MakeMaker; - WriteMakefile( ATTRIBUTE => VALUE [, ...] ); + WriteMakefile( + NAME => "Foo::Bar", + VERSION_FROM => "lib/Foo/Bar.pm", + ); =head1 DESCRIPTION @@ -1168,6 +1177,18 @@ It splits the task of generating the Makefile into several subroutines that can be individually overridden. Each subroutine returns the text it wishes to have written to the Makefile. +As there are various Make programs with incompatible syntax, which +use operating system shells, again with incompatible syntax, it is +important for users of this module to know which flavour of Make +a Makefile has been written for so they'll use the correct one and +won't have to face the possibly bewildering errors resulting from +using the wrong one. + +On POSIX systems, that program will likely be GNU Make; on Microsoft +Windows, it will be either Microsoft NMake or DMake. Note that this +module does not support generating Makefiles for GNU Make on Windows. +See the section on the L parameter for details. + MakeMaker is object oriented. Each directory below the current directory that contains a Makefile.PL is treated as a separate object. This makes it possible to write an unlimited number of @@ -1175,7 +1196,7 @@ Makefiles with a single invocation of WriteMakefile(). =head2 How To Write A Makefile.PL -See ExtUtils::MakeMaker::Tutorial. +See L. The long answer is the rest of the manpage :-) @@ -1204,7 +1225,7 @@ Other interesting targets in the generated Makefile are =head2 make test MakeMaker checks for the existence of a file named F in the -current directory and if it exists it execute the script with the +current directory, and if it exists it executes the script with the proper set of perl C<-I> options. MakeMaker also checks for any files matching glob("t/*.t"). It will @@ -1363,7 +1384,7 @@ the best: make test make install -make install per default writes some documentation of what has been +make install by default writes some documentation of what has been done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This feature can be bypassed by calling make pure_install. @@ -1395,9 +1416,9 @@ is built. You can invoke the corresponding section of the makefile with That produces a new perl binary in the current directory with all extensions linked in that can be found in INST_ARCHLIB, SITELIBEXP, and PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on -UNIX, this is called Makefile.aperl (may be system dependent). If you -want to force the creation of a new perl, it is recommended, that you -delete this Makefile.aperl, so the directories are searched-through +UNIX, this is called F (may be system dependent). If you +want to force the creation of a new perl, it is recommended that you +delete this F, so the directories are searched through for linkable libraries again. The binary can be installed into the directory where perl normally @@ -1420,7 +1441,7 @@ or say In any case you will be prompted with the correct invocation of the C target that installs the new binary into INSTALLBIN. -make inst_perl per default writes some documentation of what has been +make inst_perl by default writes some documentation of what has been done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This can be bypassed by calling make pure_inst_perl. @@ -1485,12 +1506,12 @@ relationship between INSTALLPRIVLIB and INSTALLARCHLIB is determined by Configure at perl compilation time. MakeMaker supports the user who sets INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not, then MakeMaker defaults the latter to be the same subdirectory of -INSTALLPRIVLIB as Configure decided for the counterparts in %Config , +INSTALLPRIVLIB as Configure decided for the counterparts in %Config, otherwise it defaults to INSTALLPRIVLIB. The same relationship holds for INSTALLSITELIB and INSTALLSITEARCH. MakeMaker gives you much more freedom than needed to configure -internal variables and get different results. It is worth to mention, +internal variables and get different results. It is worth mentioning that make(1) also lets you configure most of the variables that are used in the Makefile. But in the majority of situations this will not be necessary, and should only be done if the author of a package @@ -1614,7 +1635,7 @@ in ext/SDBM_File A safe filename for the package. -Defaults to NAME above but with :: replaced with -. +Defaults to NAME below but with :: replaced with -. For example, Foo::Bar becomes Foo-Bar. @@ -1854,7 +1875,7 @@ Directory to hold the man pages at 'make' time =item INST_SCRIPT -Directory, where executable files should be installed during +Directory where executable files should be installed during 'make'. Defaults to "./blib/script", just to have a dummy location during testing. make install will copy the files in INST_SCRIPT to INSTALLSCRIPT. @@ -1915,7 +1936,7 @@ MakeMaker will turn it into an array with one element. =item LICENSE -The licensing terms of your distribution. Generally its "perl" for the +The licensing terms of your distribution. Generally it's "perl" for the same license as Perl itself. See L for the list of options. @@ -1935,16 +1956,24 @@ parameter lets Makefile.PL know what make quirks to account for when generating the Makefile. MakeMaker also honors the MAKE environment variable. This parameter -takes precedent. +takes precedence. Currently the only significant values are 'dmake' and 'nmake' for Windows -users. +users, instructing MakeMaker to generate a Makefile in the flavour of +DMake ("Dennis Vadura's Make") or Microsoft NMake respectively. + +Defaults to $Config{make}, which may go looking for a Make program +in your environment. -Defaults to $Config{make}. +How are you supposed to know what flavour of Make a Makefile has +been generated for if you didn't specify a value explicitly? Search +the generated Makefile for the definition of the MAKE variable, +which is used to recursively invoke the Make utility. That will tell +you what Make you're supposed to invoke the Makefile with. =item MAKEAPERL -Boolean which tells MakeMaker, that it should include the rules to +Boolean which tells MakeMaker that it should include the rules to make a perl. This is handled automatically as a switch by MakeMaker. The user normally does not need it. @@ -1983,14 +2012,14 @@ Example similar to MAN1PODS. =item MAP_TARGET -If it is intended, that a new perl binary be produced, this variable +If it is intended that a new perl binary be produced, this variable may hold a name for that binary. Defaults to perl =item META_ADD =item META_MERGE -A hashrefs of items to add to the CPAN Meta file (F or +A hashref of items to add to the CPAN Meta file (F or F). They differ in how they behave if they have the same key as the @@ -2004,18 +2033,27 @@ get the advantage of any future defaults. The minimum required version of Perl for this distribution. -Either 5.006001 or 5.6.1 format is acceptable. +Either the 5.006001 or the 5.6.1 format is acceptable. =item MYEXTLIB -If the extension links to a library that it builds set this to the +If the extension links to a library that it builds, set this to the name of the library (see SDBM_File) =item NAME -Perl module name for this extension (DBD::Oracle). This will default -to the directory name but should be explicitly defined in the -Makefile.PL. +The package representing the distribution. For example, C +or C. It will be used to derive information about +the distribution such as the L, installation locations +within the Perl library and where XS files will be looked for by +default (see L). + +C I be a valid Perl package name and it I have an +associated C<.pm> file. For example, C is a valid C +and there must exist F. Any XS code should be in +F unless stated otherwise. + +Your distribution B have a C. =item NEEDS_LINKING @@ -2026,7 +2064,7 @@ this boolean variable yourself. =item NOECHO -Command so make does not print the literal commands its running. +Command so make does not print the literal commands it's running. By setting it to an empty string you can generate a Makefile that prints all commands. Mainly used in debugging MakeMaker itself. @@ -2073,7 +2111,7 @@ passed to subdirectory makes. =item PERL -Perl binary for tasks that can be done by miniperl +Perl binary for tasks that can be done by miniperl. =item PERL_CORE @@ -2124,7 +2162,7 @@ which rely on special alignment which is not provided by Perl's malloc(). =back -B Negligence to set this flag in I of loaded extension +B Neglecting to set this flag in I of the loaded extension nullifies many advantages of Perl's malloc(), such as better usage of system resources, error detection, memory usage reporting, catchable failure of memory allocations, etc. @@ -2133,7 +2171,7 @@ of memory allocations, etc. Directory under which core modules are to be installed. -Defaults to $Config{installprefixexp} falling back to +Defaults to $Config{installprefixexp}, falling back to $Config{installprefix}, $Config{prefixexp} or $Config{prefix} should $Config{installprefixexp} not exist. @@ -2196,11 +2234,11 @@ In this case the program will be run multiple times using each target file. perl bin/foobar.PL bin/foobar2 PL files are normally run B pm_to_blib and include INST_LIB and -INST_ARCH in its C<@INC> so the just built modules can be +INST_ARCH in their C<@INC>, so the just built modules can be accessed... unless the PL file is making a module (or anything else in PM) in which case it is run B pm_to_blib and does not include INST_LIB and INST_ARCH in its C<@INC>. This apparently odd behavior -is there for backwards compatibility (and its somewhat DWIM). +is there for backwards compatibility (and it's somewhat DWIM). =item PM @@ -2275,7 +2313,7 @@ guess about where to place things under the new PREFIX based on your Config defaults. Failing that, it will fall back to a structure which should be sensible for your platform. -If you specify LIB or any INSTALL* variables they will not be effected +If you specify LIB or any INSTALL* variables they will not be affected by the PREFIX. =item PREREQ_FATAL @@ -2287,7 +2325,7 @@ will C instead of simply informing the user of the missing dependencies. It is I rare to have to use C. Its use by module authors is I and should never be used lightly. -Module installation tools have ways of resolving umet dependencies but +Module installation tools have ways of resolving unmet dependencies but to do that they need a F. Using C breaks this. That's bad. @@ -2332,7 +2370,7 @@ added to the output as an additional line of the form: $MIN_PERL_VERSION = '5.008001'; -If BUILD_REQUIRES is not empty, it will be dumped as $BUILD_REQUIRES hasref. +If BUILD_REQUIRES is not empty, it will be dumped as $BUILD_REQUIRES hashref. =item PRINT_PREREQ @@ -2372,6 +2410,16 @@ Makefile. Caution! Do not use the SKIP attribute for the negligible speedup. It may seriously damage the resulting Makefile. Only use it if you really need it. +=item TEST_REQUIRES + +A hash of modules that are needed to test your module but not run or +build it. + +This will go into the C field of your CPAN Meta file. +(F or F). + +The format is the same as PREREQ_PM. + =item TYPEMAPS Ref to array of typemap file names. Use this when the typemaps are @@ -2422,7 +2470,7 @@ but these will fail: local $VERSION = '1.02'; local $FOO::VERSION = '1.30'; -"Version strings" are incompatible should not be used. +"Version strings" are incompatible and should not be used. # Bad $VERSION = 1.2.3; @@ -2617,7 +2665,7 @@ The correct code is C<< MAN3PODS => { } >>. =head2 Hintsfile support -MakeMaker.pm uses the architecture specific information from +MakeMaker.pm uses the architecture-specific information from Config.pm. In addition it evaluates architecture specific hints files in a C directory. The hints files are expected to be named like their counterparts in C, but with an C<.pl> file -- cgit v1.2.3