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 | |
939767c9 AD |
29 | # These use the Cwd extension. For statically-built perls, we |
30 | # need perl, not just miniperl. | |
31 | case "$usedl" in | |
32 | define) perl="../miniperl" ;; | |
33 | *) perl="../perl" ;; | |
34 | esac | |
6d4b7d88 | 35 | cat >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 | 40 | PERL = $perl |
52cebf5e | 41 | REALPERL = ../perl |
61190116 | 42 | RUN = $run # Used mainly cross-compilation setups. |
6d4b7d88 JH |
43 | |
44 | !GROK!THIS! | |
45 | ||
46 | cat >>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 | ||
deabda19 CBW |
51 | 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 ptargrep.PL cpanp-run-perl.PL cpanp.PL cpan2dist.PL shasum.PL splain.PL dprofpp.PL libnetcfg.PL piconv.PL enc2xs.PL xsubpp.PL |
52 | plextract = c2ph config_data corelist cpan h2ph h2xs instmodsh perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep cpanp-run-perl cpanp cpan2dist shasum splain dprofpp libnetcfg piconv enc2xs xsubpp | |
53 | plextractexe = ./c2ph ./config_data ./corelist ./cpan ./h2ph ./h2xs ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./cpanp-run-perl ./cpanp ./cpan2dist ./shasum ./splain ./dprofpp ./libnetcfg ./piconv ./enc2xs ./xsubpp | |
1756d26f | 54 | |
52cebf5e EP |
55 | all: $(plextract) |
56 | ||
1756d26f | 57 | $(plextract): |
6d4b7d88 | 58 | $(RUN) $(PERL) -I../lib $@.PL |
1756d26f | 59 | |
84902520 | 60 | c2ph: c2ph.PL ../config.sh |
774d564b | 61 | |
ce28de53 RGS |
62 | cpan: cpan.PL ../config.sh |
63 | ||
bb4e9162 YST |
64 | config_data: config_data.PL ../config.sh |
65 | ||
8f2fd531 JB |
66 | corelist: corelist.PL ../config.sh |
67 | ||
84902520 | 68 | h2ph: h2ph.PL ../config.sh |
774d564b | 69 | |
84902520 | 70 | h2xs: h2xs.PL ../config.sh |
32ea9a2a | 71 | |
a55f9fbc RGS |
72 | instmodsh: instmodsh.PL ../config.sh |
73 | ||
84902520 | 74 | perlbug: perlbug.PL ../config.sh ../patchlevel.h |
774d564b | 75 | |
84902520 | 76 | perldoc: perldoc.PL ../config.sh |
774d564b | 77 | |
cdf8b154 PK |
78 | perlivp: perlivp.PL ../config.sh |
79 | ||
e4fc8a1e RGS |
80 | prove: prove.PL ../config.sh |
81 | ||
291d3373 RGS |
82 | ptar: ptar.PL ../config.sh |
83 | ||
b8669316 RGS |
84 | ptardiff: ptardiff.PL ../config.sh |
85 | ||
deabda19 CBW |
86 | ptargrep: ptargrep.PL ../config.sh |
87 | ||
6aaee015 RGS |
88 | cpanp-run-perl: cpanp-run-perl.PL ../config.sh |
89 | ||
90 | cpanp: cpanp.PL ../config.sh | |
91 | ||
92 | cpan2dist: cpan2dist.PL ../config.sh | |
93 | ||
84902520 | 94 | pl2pm: pl2pm.PL ../config.sh |
774d564b | 95 | |
6bc89f92 SP |
96 | shasum: shasum.PL ../config.sh |
97 | ||
84902520 | 98 | splain: splain.PL ../config.sh ../lib/diagnostics.pm |
5f05dabc | 99 | |
95667ae4 GS |
100 | dprofpp: dprofpp.PL ../config.sh |
101 | ||
406c51ee JH |
102 | libnetcfg: libnetcfg.PL ../config.sh |
103 | ||
3e06bf43 JH |
104 | piconv: piconv.PL ../config.sh |
105 | ||
5d437a65 JH |
106 | enc2xs: enc2xs.PL ../config.sh |
107 | ||
a55f9fbc RGS |
108 | xsubpp: xsubpp.PL ../config.sh |
109 | ||
1756d26f | 110 | clean: |
111 | ||
112 | realclean: | |
52cebf5e | 113 | rm -rf $(plextract) pstruct $(plextractexe) |
bb0110d4 | 114 | rm -f ../t/_h2ph_pre.ph |
1756d26f | 115 | |
116 | clobber: realclean | |
117 | ||
118 | distclean: clobber | |
2edbd6da JH |
119 | |
120 | veryclean: distclean | |
121 | -rm -f *~ *.org | |
6d4b7d88 JH |
122 | !NO!SUBS! |
123 | $eunicefix Makefile | |
124 | case `pwd` in | |
125 | *SH) | |
126 | $rm -f ../Makefile | |
127 | $ln Makefile ../Makefile | |
128 | ;; | |
129 | esac | |
130 | rm -f $firstmakefile |