LOGONLY mark 71648f as DOCed
[p5sagit/p5-mst-13.2.git] / utils / Makefile.SH
CommitLineData
6d4b7d88 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
29cat >Makefile <<!GROK!THIS!
30
31PERL = ../miniperl
32REALPERL = ../perl
61190116 33RUN = $run # Used mainly cross-compilation setups.
6d4b7d88 34
35!GROK!THIS!
36
37cat >>Makefile <<'!NO!SUBS!'
38
39# Files to be built with variable substitution after miniperl is
40# available. Dependencies handled manually below (for now).
41
42pl = c2ph.PL config_data.PL corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL cpanp-run-perl.PL cpanp.PL cpan2dist.PL shasum.PL splain.PL dprofpp.PL libnetcfg.PL piconv.PL enc2xs.PL xsubpp.PL
43plextract = c2ph config_data corelist cpan h2ph h2xs instmodsh perlbug perldoc perlivp pl2pm prove ptar ptardiff cpanp-run-perl cpanp cpan2dist shasum splain dprofpp libnetcfg piconv enc2xs xsubpp
44plextractexe = ./c2ph ./config_data ./corelist ./cpan ./h2ph ./h2xs ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./cpanp-run-perl ./cpanp ./cpan2dist ./shasum ./splain ./dprofpp ./libnetcfg ./piconv ./enc2xs ./xsubpp
45
46all: $(plextract)
47
48$(plextract):
49 $(RUN) $(PERL) -I../lib $@.PL
50
51c2ph: c2ph.PL ../config.sh
52
53cpan: cpan.PL ../config.sh
54
55config_data: config_data.PL ../config.sh
56
57corelist: corelist.PL ../config.sh
58
59h2ph: h2ph.PL ../config.sh
60
61h2xs: h2xs.PL ../config.sh
62
63instmodsh: instmodsh.PL ../config.sh
64
65perlbug: perlbug.PL ../config.sh ../patchlevel.h
66
67perldoc: perldoc.PL ../config.sh
68
69perlivp: perlivp.PL ../config.sh
70
71prove: prove.PL ../config.sh
72
73ptar: ptar.PL ../config.sh
74
75ptardiff: ptardiff.PL ../config.sh
76
77cpanp-run-perl: cpanp-run-perl.PL ../config.sh
78
79cpanp: cpanp.PL ../config.sh
80
81cpan2dist: cpan2dist.PL ../config.sh
82
83pl2pm: pl2pm.PL ../config.sh
84
85shasum: shasum.PL ../config.sh
86
87splain: splain.PL ../config.sh ../lib/diagnostics.pm
88
89dprofpp: dprofpp.PL ../config.sh
90
91libnetcfg: libnetcfg.PL ../config.sh
92
93piconv: piconv.PL ../config.sh
94
95enc2xs: enc2xs.PL ../config.sh
96
97xsubpp: xsubpp.PL ../config.sh
98
99clean:
100
101realclean:
102 rm -rf $(plextract) pstruct $(plextractexe)
103 rm -f ../t/_h2ph_pre.ph
104
105clobber: realclean
106
107distclean: clobber
108
109veryclean: distclean
110 -rm -f *~ *.org
111!NO!SUBS!
112$eunicefix Makefile
113case `pwd` in
114*SH)
115 $rm -f ../Makefile
116 $ln Makefile ../Makefile
117 ;;
118esac
119rm -f $firstmakefile