Makefile.PL

filter: Statementstmt n/a Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« lib/ExtUtils/MakeMaker/version.pm ↑ Summary lib/ExtUtils/MY.pm »
1 #!/usr/bin/perl -w
2  
3 use 5.006;
4 use strict;
5  
6 use lib ".";
7 use my::bundles; # Must be used before anything else to set up bundled dependencies
8  
9 use lib qw(lib); # build ourself with ourself
10  
11 use File::Spec;
12 use ExtUtils::MakeMaker 6.50;
13  
14 my $BUILDING_AS_PACKAGE = $ENV{BUILDING_AS_PACKAGE} || ( grep { m!^\-\-release$! } @ARGV );
15  
16 my $Is_VMS = $^O eq 'VMS';
17  
18 check_environment();
19  
20 my (%Extra_Params, %Extra_Prereqs, %Extra_Test_Prereqs);
21  
22 # Special case for MakeMaker being built as a vendor package
23 if( $BUILDING_AS_PACKAGE ) {
24 # Some of these are lower than what we bundle. That's ok, we
25 # bundle the latest because we might as well, but we don't want to
26 # burden vendors with having to update everything.
27 %Extra_Prereqs = (
28 'CPAN::Meta' => '2.143240', # compat with CMR 2.130
29 'ExtUtils::Install' => '1.52',
30 'ExtUtils::Manifest' => '1.70',
31 'version' => '0',
32 );
33 $Extra_Prereqs{'JSON::PP::Compat5006'} = '1.09' if $] < 5.008;
34  
35 %Extra_Test_Prereqs = (
36 'File::Temp' => '0.22',
37 'Scalar::Util' => '1.13',
38 );
39 }
40 else {
41 eval {
42 require ExtUtils::Manifest;
43 require ExtUtils::Install;
44 }
45 or do {
46 $Extra_Params{PERL} = "$^X -Iinc";
47 };
48  
49 my::bundles::copy_bundles("bundled", "inc");
50 }
51  
52 # Test::Harnesses prior to 2.00 shoved all of @INC onto the command line
53 # when a test had -T. This made it too long. So we need a Test::Harness
54 # > 2.00 on VMS for t/testlib.t
55 $Extra_Prereqs{'Test::Harness'} = 2.00 if $^O eq 'VMS';
56  
57 my $MM = WriteMakefile(
58 NAME => 'ExtUtils::MakeMaker',
59 VERSION_FROM => "lib/ExtUtils/MakeMaker.pm",
60 ABSTRACT_FROM => "lib/ExtUtils/MakeMaker.pm",
61  
62 PREREQ_PM => {
63 %Extra_Prereqs,
64 'File::Spec' => 0.8, # splitpath(), rel2abs()
65 'Pod::Man' => 0, # manifypods needs Pod::Man
66 'File::Basename' => 0,
67 'Data::Dumper' => 0,
68 ($] > 5.008 ? (Encode => 0) : ()),
69 },
70 TEST_REQUIRES => \%Extra_Test_Prereqs,
71  
72 MIN_PERL_VERSION => '5.006',
73 PMLIBDIRS => [qw(lib inc)],
74 PMLIBPARENTDIRS => [qw(lib inc)], # PMLIBPARENTDIRS is an experimental feature
75 EXE_FILES => [qw(bin/instmodsh)],
76  
77 META_MERGE => {
78 no_index => {
79 # Module::Metadata is inferring version from $version::VERSION
80 # "in" is a PAUSE misparse.
81 package => [ qw(DynaLoader in version) ],
82 directory => [ qw(bundled my) ],
83 },
84 resources => {
85 license => 'http://dev.perl.org/licenses/',
86 homepage => 'https://metacpan.org/release/ExtUtils-MakeMaker',
87 bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
88 repository => 'http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker',
89 MailingList => 'makemaker@perl.org',
90 },
91 },
92  
93 CONFIGURE_REQUIRES => {}, # We don't need ourself to install ourself.
94 INSTALLDIRS => ( $] < 5.012 ? 'perl' : 'site' ),
95 LICENSE => 'perl',
96 AUTHOR => 'Michael G Schwern <schwern@pobox.com>',
97  
98 realclean => {
99 FILES => "inc"
100 },
101  
102 %Extra_Params,
103  
104 $^O =~ /win/i
105 ? (
106 dist => {
107 TAR => 'ptar',
108 TARFLAGS => '-c -C -f',
109 },
110 )
111 : (),
112 );
113  
114 # Display warnings about the environment.
115 sub check_environment {
116 if ( $Is_VMS && $ENV{bin} ) {
117 print <<BIN_WARN;
118  
119 The logical name BIN may be present. This may interfere with MakeMaker's
120 tests and operations. GNV is the prime suspect for setting this.
121  
122 BIN_WARN
123  
124 sleep 2;
125 }
126 }
127  
128 {
129 package MY;
130  
131 # Make sure PERLRUN uses the MakeMaker about to be installed
132 # and not the currently installed one.
133 sub init_PERL {
134 my ( $self ) = shift;
135 $self->SUPER::init_PERL;
136  
137 $self->{$_} .= q[ "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"] for qw( PERLRUN FULLPERLRUN ABSPERLRUN );
138 }
139  
140 sub special_targets {
141 my $make_frag = shift->SUPER::special_targets(@_);
142 return $make_frag if $Is_VMS; # not supported in MMS, MMK
143 $make_frag .= <<'MAKE_FRAG';
144 .NOTPARALLEL: pure_all
145  
146 MAKE_FRAG
147 return $make_frag;
148 }
149  
150 }
« lib/ExtUtils/MakeMaker/version.pm ↑ Summary lib/ExtUtils/MY.pm »