xref: /openbsd/gnu/usr.bin/perl/utils/Makefile.PL (revision 3cab2bb3)
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
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
16require './regen/regen_lib.pl';
17
18my $target = 'utils/Makefile';
19print "Extracting $target (with variable substitutions)\n";
20my $fh = open_new($target, undef, {by => $0}, 1);
21
22# These use the Cwd extension.  For statically-built perls, we
23# need perl, not just miniperl.
24my $perl = defined $Config{usedl} ? '../miniperl' : '../perl';
25
26print $fh <<"EOT";
27PERL = $perl
28REALPERL = ../perl
29RUN =  # Used mainly cross-compilation setups.
30
31EOT
32
33print $fh <<'EOT';
34
35# Files to be built with variable substitution after miniperl is
36# available.  Dependencies handled manually below (for now).
37
38pl = corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL
39plextract = corelist cpan h2ph h2xs instmodsh perlbug perldoc perlivp pl2pm prove splain libnetcfg piconv enc2xs encguess xsubpp pod2html
40plextractexe = ./corelist ./cpan ./h2ph ./h2xs ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html
41
42all: $(plextract)
43
44$(plextract):
45	$(RUN) $(PERL) -I../lib $@.PL
46
47cpan:		cpan.PL ../config.sh
48
49corelist:	corelist.PL ../config.sh
50
51h2ph:		h2ph.PL ../config.sh
52
53h2xs:		h2xs.PL ../config.sh
54
55instmodsh:	instmodsh.PL ../config.sh
56
57perlbug:	perlbug.PL ../config.sh ../patchlevel.h
58
59perldoc:	perldoc.PL ../config.sh
60
61perlivp:	perlivp.PL ../config.sh
62
63prove:		prove.PL ../config.sh
64
65pl2pm:		pl2pm.PL ../config.sh
66
67splain:		splain.PL ../config.sh ../lib/diagnostics.pm
68
69libnetcfg:	libnetcfg.PL ../config.sh
70
71piconv:		piconv.PL ../config.sh
72
73enc2xs:		enc2xs.PL ../config.sh
74
75enc2xs:		encguess.PL ../config.sh
76
77xsubpp:		xsubpp.PL ../config.sh
78
79pod2html:	pod2html.PL ../config.sh ../ext/Pod-Html/bin/pod2html
80
81clean:
82
83realclean:
84	rm -rf $(plextract) $(plextractexe)
85	rm -f ../t/_h2ph_pre.ph
86
87clobber:	realclean
88
89distclean:	clobber
90
91veryclean:	distclean
92	-rm -f *~ *.org
93EOT
94
95read_only_bottom_close_and_rename($fh);
96