This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Replace utils/Makefile.SH with utils/Makefile.PL
[perl5.git] / utils / Makefile.PL
CommitLineData
145bbcac
NC
1#!./miniperl -w
2use strict;
3use Config;
4
5if (@ARGV) {
6 my $dir = shift;
7 chdir $dir or die "Can't chdir '$dir': $!";
8}
9
10require 'regen/regen_lib.pl';
11
12my $target = 'utils/Makefile';
13print "Extracting $target (with variable substitutions)\n";
14my $fh = open_new($target, undef, undef, 1);
15
939767c9
AD
16# These use the Cwd extension. For statically-built perls, we
17# need perl, not just miniperl.
145bbcac
NC
18my $perl = defined $Config{usedl} ? '../miniperl' : '../perl';
19
20print $fh <<"EOT";
939767c9
AD
21# Generated from utils/Makefile.SH. The generated file is
22# shipped with the source kit for systems such as win32
23# which don't do .SH extraction.
1756d26f 24
939767c9 25PERL = $perl
52cebf5e 26REALPERL = ../perl
145bbcac 27RUN = $Config{run} # Used mainly cross-compilation setups.
6d4b7d88 28
145bbcac 29EOT
6d4b7d88 30
145bbcac 31print $fh <<'EOT';
1756d26f 32
33# Files to be built with variable substitution after miniperl is
34# available. Dependencies handled manually below (for now).
35
fb598ba5
CBW
36pl = c2ph.PL config_data.PL corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL xsubpp.PL pod2html.PL zipdetails.PL
37plextract = c2ph config_data corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs xsubpp pod2html zipdetails
38plextractexe = ./c2ph ./config_data ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./xsubpp ./pod2html ./zipdetails
1756d26f 39
52cebf5e
EP
40all: $(plextract)
41
1756d26f 42$(plextract):
6d4b7d88 43 $(RUN) $(PERL) -I../lib $@.PL
1756d26f 44
84902520 45c2ph: c2ph.PL ../config.sh
774d564b 46
ce28de53
RGS
47cpan: cpan.PL ../config.sh
48
bb4e9162
YST
49config_data: config_data.PL ../config.sh
50
8f2fd531
JB
51corelist: corelist.PL ../config.sh
52
84902520 53h2ph: h2ph.PL ../config.sh
774d564b 54
84902520 55h2xs: h2xs.PL ../config.sh
32ea9a2a 56
a55f9fbc
RGS
57instmodsh: instmodsh.PL ../config.sh
58
bdec6fb9
MH
59json_pp: json_pp.PL ../config.sh
60
84902520 61perlbug: perlbug.PL ../config.sh ../patchlevel.h
774d564b 62
84902520 63perldoc: perldoc.PL ../config.sh
774d564b 64
cdf8b154
PK
65perlivp: perlivp.PL ../config.sh
66
e4fc8a1e
RGS
67prove: prove.PL ../config.sh
68
291d3373
RGS
69ptar: ptar.PL ../config.sh
70
b8669316
RGS
71ptardiff: ptardiff.PL ../config.sh
72
deabda19
CBW
73ptargrep: ptargrep.PL ../config.sh
74
84902520 75pl2pm: pl2pm.PL ../config.sh
774d564b 76
6bc89f92
SP
77shasum: shasum.PL ../config.sh
78
84902520 79splain: splain.PL ../config.sh ../lib/diagnostics.pm
5f05dabc 80
406c51ee
JH
81libnetcfg: libnetcfg.PL ../config.sh
82
3e06bf43
JH
83piconv: piconv.PL ../config.sh
84
5d437a65
JH
85enc2xs: enc2xs.PL ../config.sh
86
a55f9fbc
RGS
87xsubpp: xsubpp.PL ../config.sh
88
08ad9465
CBW
89zipdetails: zipdetails.PL ../config.sh
90
d658129c
FR
91pod2html: pod2html.PL ../config.sh ../ext/Pod-Html/bin/pod2html
92
1756d26f 93clean:
94
95realclean:
52cebf5e 96 rm -rf $(plextract) pstruct $(plextractexe)
bb0110d4 97 rm -f ../t/_h2ph_pre.ph
1756d26f 98
99clobber: realclean
100
101distclean: clobber
2edbd6da
JH
102
103veryclean: distclean
104 -rm -f *~ *.org
145bbcac
NC
105EOT
106
107close_and_rename($fh);