From: Jarkko Hietaniemi Date: Sat, 3 Nov 2001 17:33:21 +0000 (+0000) Subject: Add MakeMaker PREREQ_PRINT and PRINT_PREREQ targets. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=88d69b28eb77c3cb60b877e68c428e1122a0c3da;p=p5sagit%2Fp5-mst-13.2.git Add MakeMaker PREREQ_PRINT and PRINT_PREREQ targets. The latter is a RedHatism. p4raw-id: //depot/perl@12833 --- diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index b34fe28..a6e56b3 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -209,8 +209,9 @@ sub full_setup { PERLRUN PERLRUNINST PERL_ARCHLIB PERL_CORE PERL_LIB PERL_SRC PERM_RW PERM_RWX PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC - PPM_INSTALL_SCRIPT PREFIX PREREQ_FATAL - PREREQ_PM SKIP TEST_LIBS TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG + PPM_INSTALL_SCRIPT PREFIX + PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ + SKIP TEST_LIBS 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 @@ -327,6 +328,17 @@ sub ExtUtils::MakeMaker::new { my($class,$self) = @_; my($key); + if ("@ARGV" =~ /\bPREREQ_PRINT\b/) { + require Data::Dumper; + print Data::Dumper->Dump([$self->{PREREQ_PM}], [qw(PREREQ_PM)]); + } + + # PRINT_PREREQ is RedHatism. + if ("@ARGV" =~ /\bPRINT_PREREQ\b/) { + print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " } sort keys %{$self->{PREREQ_PM}}), "\n"; + exit 0; + } + print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose; if (-f "MANIFEST" && ! -f "Makefile"){ check_manifest(); @@ -1802,6 +1814,23 @@ at a later time, e.g. after an unsuccessful B of your module. It is I rare to have to use C at all! +=item PREREQ_PRINT + +Bool. If this parameter is true, the prerequisites will be printed to +stdout and MakeMaker will exit. The output format is + +$PREREQ_PM = { + 'A::B' => Vers1, + 'C::D' => Vers2, + ... + }; + +=item PRINT_PREREQ + +RedHatism for C. The output format is different, though: + + perl(A::B)>=Vers1 perl(C::D)>=Vers2 ... + =item SKIP Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the