xref: /openbsd/gnu/usr.bin/perl/utils/Makefile.PL (revision 9dc91179)
16fb12b70Safresh1#!./miniperl -w
26fb12b70Safresh1use strict;
36fb12b70Safresh1use Config;
46fb12b70Safresh1
56fb12b70Safresh1if (@ARGV) {
66fb12b70Safresh1    my $dir = shift;
76fb12b70Safresh1    chdir $dir or die "Can't chdir '$dir': $!";
86fb12b70Safresh1}
96fb12b70Safresh1
106fb12b70Safresh1# Note, the generated utils/Makefile isn't used by VMS yet.
116fb12b70Safresh1# The next step on cleaning this is up is probably to work to reduce the size
126fb12b70Safresh1# of the "problem" in both this file and vms/descrip_mms.template by
136fb12b70Safresh1# attempting to move the work from them to the extension directories and
146fb12b70Safresh1# ExtUtils::MakeMaker.
156fb12b70Safresh1
169f11ffb7Safresh1require './regen/regen_lib.pl';
176fb12b70Safresh1
186fb12b70Safresh1my $target = 'utils/Makefile';
196fb12b70Safresh1print "Extracting $target (with variable substitutions)\n";
206fb12b70Safresh1my $fh = open_new($target, undef, {by => $0}, 1);
216fb12b70Safresh1
226fb12b70Safresh1# These use the Cwd extension.  For statically-built perls, we
236fb12b70Safresh1# need perl, not just miniperl.
246fb12b70Safresh1my $perl = defined $Config{usedl} ? '../miniperl' : '../perl';
256fb12b70Safresh1
266fb12b70Safresh1print $fh <<"EOT";
276fb12b70Safresh1PERL = $perl
286fb12b70Safresh1REALPERL = ../perl
296fb12b70Safresh1RUN =  # Used mainly cross-compilation setups.
306fb12b70Safresh1
316fb12b70Safresh1EOT
326fb12b70Safresh1
336fb12b70Safresh1print $fh <<'EOT';
346fb12b70Safresh1
356fb12b70Safresh1# Files to be built with variable substitution after miniperl is
366fb12b70Safresh1# available.  Dependencies handled manually below (for now).
376fb12b70Safresh1
38*9dc91179Safresh1pl = 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 zipdetails.PL streamzip.PL
39*9dc91179Safresh1plextract = corelist cpan h2ph h2xs instmodsh perlbug perldoc perlivp pl2pm prove splain libnetcfg piconv enc2xs encguess xsubpp pod2html zipdetails streamzip
40*9dc91179Safresh1plextractexe = ./corelist ./cpan ./h2ph ./h2xs ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./splain ./libnetcfg ./piconv ./enc2xs ./encguess xsubpp.PL ./pod2html ./zipdetails ./streamzip
416fb12b70Safresh1
426fb12b70Safresh1all: $(plextract)
436fb12b70Safresh1
446fb12b70Safresh1$(plextract):
456fb12b70Safresh1	$(RUN) $(PERL) -I../lib $@.PL
466fb12b70Safresh1
476fb12b70Safresh1cpan:		cpan.PL ../config.sh
486fb12b70Safresh1
496fb12b70Safresh1corelist:	corelist.PL ../config.sh
506fb12b70Safresh1
516fb12b70Safresh1h2ph:		h2ph.PL ../config.sh
526fb12b70Safresh1
536fb12b70Safresh1h2xs:		h2xs.PL ../config.sh
546fb12b70Safresh1
556fb12b70Safresh1instmodsh:	instmodsh.PL ../config.sh
566fb12b70Safresh1
576fb12b70Safresh1perlbug:	perlbug.PL ../config.sh ../patchlevel.h
586fb12b70Safresh1
596fb12b70Safresh1perldoc:	perldoc.PL ../config.sh
606fb12b70Safresh1
616fb12b70Safresh1perlivp:	perlivp.PL ../config.sh
626fb12b70Safresh1
636fb12b70Safresh1prove:		prove.PL ../config.sh
646fb12b70Safresh1
656fb12b70Safresh1pl2pm:		pl2pm.PL ../config.sh
666fb12b70Safresh1
676fb12b70Safresh1splain:		splain.PL ../config.sh ../lib/diagnostics.pm
686fb12b70Safresh1
696fb12b70Safresh1libnetcfg:	libnetcfg.PL ../config.sh
706fb12b70Safresh1
716fb12b70Safresh1piconv:		piconv.PL ../config.sh
726fb12b70Safresh1
736fb12b70Safresh1enc2xs:		enc2xs.PL ../config.sh
746fb12b70Safresh1
75b8851fccSafresh1enc2xs:		encguess.PL ../config.sh
76b8851fccSafresh1
776fb12b70Safresh1xsubpp:		xsubpp.PL ../config.sh
786fb12b70Safresh1
7956d68f1eSafresh1streamzip:	streamzip.PL ../config.sh
8056d68f1eSafresh1
816fb12b70Safresh1pod2html:	pod2html.PL ../config.sh ../ext/Pod-Html/bin/pod2html
826fb12b70Safresh1
836fb12b70Safresh1clean:
846fb12b70Safresh1
856fb12b70Safresh1realclean:
869f11ffb7Safresh1	rm -rf $(plextract) $(plextractexe)
876fb12b70Safresh1	rm -f ../t/_h2ph_pre.ph
886fb12b70Safresh1
896fb12b70Safresh1clobber:	realclean
906fb12b70Safresh1
916fb12b70Safresh1distclean:	clobber
926fb12b70Safresh1
936fb12b70Safresh1veryclean:	distclean
946fb12b70Safresh1	-rm -f *~ *.org
956fb12b70Safresh1EOT
966fb12b70Safresh1
976fb12b70Safresh1read_only_bottom_close_and_rename($fh);
98