Commit | Line | Data |
---|---|---|
6d4b7d88 JH |
1 | case $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 | ;; | |
13 | esac | |
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. | |
16 | case "$0" in | |
17 | */Makefile.SH) cd `expr X$0 : 'X\(.*\)/'` ;; | |
18 | Makefile.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;; | |
25 | esac | |
26 | ||
27 | echo "Extracting utils/Makefile (with variable substitutions)" | |
28 | rm -f Makefile | |
29 | cat >Makefile <<!GROK!THIS! | |
1756d26f | 30 | |
31 | PERL = ../miniperl | |
52cebf5e | 32 | REALPERL = ../perl |
61190116 | 33 | RUN = $run # Used mainly cross-compilation setups. |
6d4b7d88 JH |
34 | |
35 | !GROK!THIS! | |
36 | ||
37 | cat >>Makefile <<'!NO!SUBS!' | |
1756d26f | 38 | |
39 | # Files to be built with variable substitution after miniperl is | |
40 | # available. Dependencies handled manually below (for now). | |
41 | ||
6aaee015 RGS |
42 | pl = 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 |
43 | plextract = 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 | |
44 | plextractexe = ./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 | |
1756d26f | 45 | |
52cebf5e EP |
46 | all: $(plextract) |
47 | ||
1756d26f | 48 | $(plextract): |
6d4b7d88 | 49 | $(RUN) $(PERL) -I../lib $@.PL |
1756d26f | 50 | |
84902520 | 51 | c2ph: c2ph.PL ../config.sh |
774d564b | 52 | |
ce28de53 RGS |
53 | cpan: cpan.PL ../config.sh |
54 | ||
bb4e9162 YST |
55 | config_data: config_data.PL ../config.sh |
56 | ||
8f2fd531 JB |
57 | corelist: corelist.PL ../config.sh |
58 | ||
84902520 | 59 | h2ph: h2ph.PL ../config.sh |
774d564b | 60 | |
84902520 | 61 | h2xs: h2xs.PL ../config.sh |
32ea9a2a | 62 | |
a55f9fbc RGS |
63 | instmodsh: instmodsh.PL ../config.sh |
64 | ||
84902520 | 65 | perlbug: perlbug.PL ../config.sh ../patchlevel.h |
774d564b | 66 | |
84902520 | 67 | perldoc: perldoc.PL ../config.sh |
774d564b | 68 | |
cdf8b154 PK |
69 | perlivp: perlivp.PL ../config.sh |
70 | ||
e4fc8a1e RGS |
71 | prove: prove.PL ../config.sh |
72 | ||
291d3373 RGS |
73 | ptar: ptar.PL ../config.sh |
74 | ||
b8669316 RGS |
75 | ptardiff: ptardiff.PL ../config.sh |
76 | ||
6aaee015 RGS |
77 | cpanp-run-perl: cpanp-run-perl.PL ../config.sh |
78 | ||
79 | cpanp: cpanp.PL ../config.sh | |
80 | ||
81 | cpan2dist: cpan2dist.PL ../config.sh | |
82 | ||
84902520 | 83 | pl2pm: pl2pm.PL ../config.sh |
774d564b | 84 | |
6bc89f92 SP |
85 | shasum: shasum.PL ../config.sh |
86 | ||
84902520 | 87 | splain: splain.PL ../config.sh ../lib/diagnostics.pm |
5f05dabc | 88 | |
95667ae4 GS |
89 | dprofpp: dprofpp.PL ../config.sh |
90 | ||
406c51ee JH |
91 | libnetcfg: libnetcfg.PL ../config.sh |
92 | ||
3e06bf43 JH |
93 | piconv: piconv.PL ../config.sh |
94 | ||
5d437a65 JH |
95 | enc2xs: enc2xs.PL ../config.sh |
96 | ||
a55f9fbc RGS |
97 | xsubpp: xsubpp.PL ../config.sh |
98 | ||
1756d26f | 99 | clean: |
100 | ||
101 | realclean: | |
52cebf5e | 102 | rm -rf $(plextract) pstruct $(plextractexe) |
bb0110d4 | 103 | rm -f ../t/_h2ph_pre.ph |
1756d26f | 104 | |
105 | clobber: realclean | |
106 | ||
107 | distclean: clobber | |
2edbd6da JH |
108 | |
109 | veryclean: distclean | |
110 | -rm -f *~ *.org | |
6d4b7d88 JH |
111 | !NO!SUBS! |
112 | $eunicefix Makefile | |
113 | case `pwd` in | |
114 | *SH) | |
115 | $rm -f ../Makefile | |
116 | $ln Makefile ../Makefile | |
117 | ;; | |
118 | esac | |
119 | rm -f $firstmakefile |