This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactor File::DosGlob to avoid an unescaped { in a regex.
[perl5.git] / utils / Makefile.SH
CommitLineData
6d4b7d88
JH
1case $PERL_CONFIG_SH in
2'')
3 if test -f config.sh; then TOP=.;
4 elif test -f ../config.sh; then TOP=..;
5 elif test -f ../../config.sh; then TOP=../..;
6 elif test -f ../../../config.sh; then TOP=../../..;
7 elif test -f ../../../../config.sh; then TOP=../../../..;
8 else
9 echo "Can't find config.sh."; exit 1
10 fi
11 . $TOP/config.sh
12 ;;
13esac
14: This forces SH files to create target in same directory as SH file.
15: This is so that make depend always knows where to find SH derivatives.
16case "$0" in
17*/Makefile.SH) cd `expr X$0 : 'X\(.*\)/'` ;;
18Makefile.SH) ;;
19*) case `pwd` in
20 */utils) ;;
21 *) if test -d utils; then cd utils
22 else echo "Can't figure out where to write output."; exit 1
23 fi;;
24 esac;;
25esac
26
27echo "Extracting utils/Makefile (with variable substitutions)"
28rm -f Makefile
939767c9
AD
29# These use the Cwd extension. For statically-built perls, we
30# need perl, not just miniperl.
31case "$usedl" in
32 define) perl="../miniperl" ;;
33 *) perl="../perl" ;;
34esac
6d4b7d88 35cat >Makefile <<!GROK!THIS!
939767c9
AD
36# Generated from utils/Makefile.SH. The generated file is
37# shipped with the source kit for systems such as win32
38# which don't do .SH extraction.
1756d26f 39
939767c9 40PERL = $perl
52cebf5e 41REALPERL = ../perl
61190116 42RUN = $run # Used mainly cross-compilation setups.
6d4b7d88
JH
43
44!GROK!THIS!
45
46cat >>Makefile <<'!NO!SUBS!'
1756d26f 47
48# Files to be built with variable substitution after miniperl is
49# available. Dependencies handled manually below (for now).
50
08ad9465
CBW
51pl = 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 cpanp-run-perl.PL cpanp.PL cpan2dist.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL xsubpp.PL pod2html.PL zipdetails.PL
52plextract = c2ph config_data corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep cpanp-run-perl cpanp cpan2dist shasum splain libnetcfg piconv enc2xs xsubpp pod2html zipdetails
53plextractexe = ./c2ph ./config_data ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./cpanp-run-perl ./cpanp ./cpan2dist ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./xsubpp ./pod2html ./zipdetails
1756d26f 54
52cebf5e
EP
55all: $(plextract)
56
1756d26f 57$(plextract):
6d4b7d88 58 $(RUN) $(PERL) -I../lib $@.PL
1756d26f 59
84902520 60c2ph: c2ph.PL ../config.sh
774d564b 61
ce28de53
RGS
62cpan: cpan.PL ../config.sh
63
bb4e9162
YST
64config_data: config_data.PL ../config.sh
65
8f2fd531
JB
66corelist: corelist.PL ../config.sh
67
84902520 68h2ph: h2ph.PL ../config.sh
774d564b 69
84902520 70h2xs: h2xs.PL ../config.sh
32ea9a2a 71
a55f9fbc
RGS
72instmodsh: instmodsh.PL ../config.sh
73
bdec6fb9
MH
74json_pp: json_pp.PL ../config.sh
75
84902520 76perlbug: perlbug.PL ../config.sh ../patchlevel.h
774d564b 77
84902520 78perldoc: perldoc.PL ../config.sh
774d564b 79
cdf8b154
PK
80perlivp: perlivp.PL ../config.sh
81
e4fc8a1e
RGS
82prove: prove.PL ../config.sh
83
291d3373
RGS
84ptar: ptar.PL ../config.sh
85
b8669316
RGS
86ptardiff: ptardiff.PL ../config.sh
87
deabda19
CBW
88ptargrep: ptargrep.PL ../config.sh
89
6aaee015
RGS
90cpanp-run-perl: cpanp-run-perl.PL ../config.sh
91
92cpanp: cpanp.PL ../config.sh
93
94cpan2dist: cpan2dist.PL ../config.sh
95
84902520 96pl2pm: pl2pm.PL ../config.sh
774d564b 97
6bc89f92
SP
98shasum: shasum.PL ../config.sh
99
84902520 100splain: splain.PL ../config.sh ../lib/diagnostics.pm
5f05dabc 101
406c51ee
JH
102libnetcfg: libnetcfg.PL ../config.sh
103
3e06bf43
JH
104piconv: piconv.PL ../config.sh
105
5d437a65
JH
106enc2xs: enc2xs.PL ../config.sh
107
a55f9fbc
RGS
108xsubpp: xsubpp.PL ../config.sh
109
08ad9465
CBW
110zipdetails: zipdetails.PL ../config.sh
111
d658129c
FR
112pod2html: pod2html.PL ../config.sh ../ext/Pod-Html/bin/pod2html
113
1756d26f 114clean:
115
116realclean:
52cebf5e 117 rm -rf $(plextract) pstruct $(plextractexe)
bb0110d4 118 rm -f ../t/_h2ph_pre.ph
1756d26f 119
120clobber: realclean
121
122distclean: clobber
2edbd6da
JH
123
124veryclean: distclean
125 -rm -f *~ *.org
6d4b7d88
JH
126!NO!SUBS!
127$eunicefix Makefile
128case `pwd` in
129*SH)
130 $rm -f ../Makefile
131 $ln Makefile ../Makefile
132 ;;
133esac
134rm -f $firstmakefile