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