Commit | Line | Data |
---|---|---|
aa275be2 | 1 | case $PERL_CONFIG_SH in |
4755096e GS |
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 | */*) cd `expr X$0 : 'X\(.*\)/'` ;; | |
18 | esac | |
19 | ||
20 | if test -d pod; then | |
21 | cd pod || exit 1 | |
22 | fi | |
23 | POD=`echo *.pod` | |
24 | MAN=`echo $POD|sed 's/\.pod/\.man/g'` | |
e788edff | 25 | HTML=`echo $POD|sed 's/perltoc.pod//'|sed 's/\.pod/\.html/g'` |
4755096e GS |
26 | TEX=`echo $POD|sed 's/\.pod/\.tex/g'` |
27 | ||
28 | echo "Extracting pod/Makefile (with variable substitutions)" | |
29 | : This section of the file will have variable substitutions done on it. | |
30 | : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. | |
31 | : Protect any dollar signs and backticks that you do not want interpreted | |
32 | : by putting a backslash in front. You may delete these comments. | |
33 | ||
34 | $spitshell >Makefile <<!GROK!THIS! | |
35 | # pod/Makefile | |
36 | # This file is derived from pod/Makefile.SH. Any changes made here will | |
37 | # be lost the next time you run Configure. | |
38 | ||
39 | POD = $POD | |
40 | ||
41 | MAN = $MAN | |
42 | ||
43 | # no perltoc.html | |
44 | HTML = $HTML | |
45 | ||
46 | TEX = $TEX | |
47 | ||
c2e66d9e GS |
48 | # The following is used to include the current directory in |
49 | # the dynamic loader path you are building a shared libperl. | |
50 | LDLIBPTH = $ldlibpth | |
51 | ||
4755096e GS |
52 | !GROK!THIS! |
53 | ||
54 | ## In the following dollars and backticks do not need the extra backslash. | |
55 | $spitshell >>Makefile <<'!NO!SUBS!' | |
56 | ||
57 | CONVERTERS = pod2html pod2latex pod2man pod2text checkpods \ | |
58 | pod2usage podchecker podselect | |
59 | ||
60 | HTMLROOT = / # Change this to fix cross-references in HTML | |
61 | POD2HTML = pod2html \ | |
62 | --htmlroot=$(HTMLROOT) \ | |
63 | --podroot=.. --podpath=pod:lib:ext:vms \ | |
64 | --libpods=perlfunc:perlguts:perlvar:perlrun:perlop | |
65 | ||
66 | PERL = ../miniperl | |
2607bbb4 | 67 | PERLILIB = $(PERL) -I../lib |
4755096e GS |
68 | REALPERL = ../perl |
69 | ||
70 | all: $(CONVERTERS) man | |
71 | ||
72 | converters: $(CONVERTERS) | |
73 | ||
74 | regen_pods: perlmodlib.pod toc | |
75 | ||
c2e66d9e | 76 | buildtoc: buildtoc.PL perl.pod ../MANIFEST |
2607bbb4 | 77 | $(PERLILIB) buildtoc.PL |
a7ffa9b9 NC |
78 | |
79 | perltoc.pod: buildtoc | |
4755096e GS |
80 | |
81 | man: pod2man $(MAN) | |
82 | ||
83 | html: pod2html $(HTML) | |
84 | ||
85 | tex: pod2latex $(TEX) | |
86 | ||
1fa7ca25 | 87 | toc perltoc.pod: buildtoc |
2607bbb4 | 88 | $(PERLILIB) buildtoc |
4755096e GS |
89 | |
90 | .SUFFIXES: .pm .pod | |
91 | ||
92 | .SUFFIXES: .man | |
93 | ||
94 | .pm.man: pod2man | |
95 | $(PERL) -I../lib pod2man $*.pm >$*.man | |
96 | ||
97 | .pod.man: pod2man | |
98 | $(PERL) -I../lib pod2man $*.pod >$*.man | |
99 | ||
100 | .SUFFIXES: .html | |
101 | ||
102 | .pm.html: pod2html | |
103 | $(PERL) -I../lib $(POD2HTML) --infile=$*.pm --outfile=$*.html | |
104 | ||
105 | .pod.html: pod2html | |
106 | $(PERL) -I../lib $(POD2HTML) --infile=$*.pod --outfile=$*.html | |
107 | ||
108 | .SUFFIXES: .tex | |
109 | ||
110 | .pm.tex: pod2latex | |
111 | $(PERL) -I../lib pod2latex $*.pm | |
112 | ||
113 | .pod.tex: pod2latex | |
114 | $(PERL) -I../lib pod2latex $*.pod | |
115 | ||
116 | clean: | |
117 | rm -f $(MAN) | |
118 | rm -f $(HTML) | |
119 | rm -f $(TEX) | |
120 | rm -f pod2html-*cache | |
121 | rm -f *.aux *.log *.exe | |
122 | ||
123 | realclean: clean | |
124 | rm -f $(CONVERTERS) | |
125 | ||
126 | distclean: realclean | |
127 | ||
2edbd6da JH |
128 | veryclean: distclean |
129 | -rm -f *~ *.orig | |
130 | ||
4755096e GS |
131 | check: checkpods |
132 | @echo "checking..."; \ | |
133 | $(PERL) -I../lib checkpods $(POD) | |
134 | ||
135 | # Dependencies. | |
136 | pod2latex: pod2latex.PL ../lib/Config.pm | |
c2e66d9e | 137 | $(LDLIBPTH) $(PERL) -I../lib pod2latex.PL |
4755096e GS |
138 | |
139 | pod2html: pod2html.PL ../lib/Config.pm | |
c2e66d9e | 140 | $(LDLIBPTH) $(PERL) -I ../lib pod2html.PL |
4755096e GS |
141 | |
142 | pod2man: pod2man.PL ../lib/Config.pm | |
c2e66d9e | 143 | $(LDLIBPTH) $(PERL) -I ../lib pod2man.PL |
4755096e GS |
144 | |
145 | pod2text: pod2text.PL ../lib/Config.pm | |
c2e66d9e | 146 | $(LDLIBPTH) $(PERL) -I ../lib pod2text.PL |
4755096e GS |
147 | |
148 | checkpods: checkpods.PL ../lib/Config.pm | |
c2e66d9e | 149 | $(LDLIBPTH) $(PERL) -I ../lib checkpods.PL |
4755096e GS |
150 | |
151 | pod2usage: pod2usage.PL ../lib/Config.pm | |
152 | $(PERL) -I ../lib pod2usage.PL | |
153 | ||
154 | podchecker: podchecker.PL ../lib/Config.pm | |
155 | $(PERL) -I ../lib podchecker.PL | |
156 | ||
157 | podselect: podselect.PL ../lib/Config.pm | |
158 | $(PERL) -I ../lib podselect.PL | |
159 | ||
1fa7ca25 | 160 | perlmodlib.pod: $(PERL) perlmodlib.PL ../mv-if-diff ../MANIFEST |
4755096e GS |
161 | rm -f perlmodlib.tmp |
162 | $(PERL) -I ../lib perlmodlib.PL | |
163 | sh ../mv-if-diff perlmodlib.tmp perlmodlib.pod | |
164 | ||
165 | compile: all | |
f5eac215 JH |
166 | $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o pod2latex.exe pod2latex -log ../compilelog |
167 | $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o pod2man.exe pod2man -log ../compilelog | |
168 | $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o pod2text.exe pod2text -log ../compilelog | |
169 | $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o checkpods.exe checkpods -log ../compilelog | |
4755096e GS |
170 | |
171 | !NO!SUBS! |