Reorder perl.pod once more.
[p5sagit/p5-mst-13.2.git] / pod / Makefile.SH
CommitLineData
ff45a9ac 1case $CONFIG 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*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
18esac
19
20if test -d pod; then
21 cd pod || exit 1
22fi
23POD=`echo *.pod`
24MAN=`echo $POD|sed 's/\.pod/\.man/g'`
25HTML=`echo $POD|sed 's/perltoc.pod//'|sed 's/\.pod/\.man/g'`
26TEX=`echo $POD|sed 's/\.pod/\.tex/g'`
27
28echo "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
39POD = $POD
40
41MAN = $MAN
42
43# no perltoc.html
44HTML = $HTML
45
46TEX = $TEX
47
48!GROK!THIS!
49
50## In the following dollars and backticks do not need the extra backslash.
51$spitshell >>Makefile <<'!NO!SUBS!'
52
53CONVERTERS = pod2html pod2latex pod2man pod2text checkpods \
54 pod2usage podchecker podselect
55
56HTMLROOT = / # Change this to fix cross-references in HTML
57POD2HTML = pod2html \
58 --htmlroot=$(HTMLROOT) \
59 --podroot=.. --podpath=pod:lib:ext:vms \
60 --libpods=perlfunc:perlguts:perlvar:perlrun:perlop
61
62PERL = ../miniperl
63REALPERL = ../perl
64
65all: $(CONVERTERS) man
66
67converters: $(CONVERTERS)
68
69regen_pods: perlmodlib.pod toc
70
71buildtoc: buildtoc.PL
72 $(PERL) -I ../lib buildtoc.PL
73
74man: pod2man $(MAN)
75
76html: pod2html $(HTML)
77
78tex: pod2latex $(TEX)
79
80toc:
81 $(PERL) -I../lib buildtoc
82
83.SUFFIXES: .pm .pod
84
85.SUFFIXES: .man
86
87.pm.man: pod2man
88 $(PERL) -I../lib pod2man $*.pm >$*.man
89
90.pod.man: pod2man
91 $(PERL) -I../lib pod2man $*.pod >$*.man
92
93.SUFFIXES: .html
94
95.pm.html: pod2html
96 $(PERL) -I../lib $(POD2HTML) --infile=$*.pm --outfile=$*.html
97
98.pod.html: pod2html
99 $(PERL) -I../lib $(POD2HTML) --infile=$*.pod --outfile=$*.html
100
101.SUFFIXES: .tex
102
103.pm.tex: pod2latex
104 $(PERL) -I../lib pod2latex $*.pm
105
106.pod.tex: pod2latex
107 $(PERL) -I../lib pod2latex $*.pod
108
109clean:
110 rm -f $(MAN)
111 rm -f $(HTML)
112 rm -f $(TEX)
113 rm -f pod2html-*cache
114 rm -f *.aux *.log *.exe
115
116realclean: clean
117 rm -f $(CONVERTERS)
118
119distclean: realclean
120
121check: checkpods
122 @echo "checking..."; \
123 $(PERL) -I../lib checkpods $(POD)
124
125# Dependencies.
126pod2latex: pod2latex.PL ../lib/Config.pm
127 $(PERL) -I../lib pod2latex.PL
128
129pod2html: pod2html.PL ../lib/Config.pm
130 $(PERL) -I ../lib pod2html.PL
131
132pod2man: pod2man.PL ../lib/Config.pm
133 $(PERL) -I ../lib pod2man.PL
134
135pod2text: pod2text.PL ../lib/Config.pm
136 $(PERL) -I ../lib pod2text.PL
137
138checkpods: checkpods.PL ../lib/Config.pm
139 $(PERL) -I ../lib checkpods.PL
140
141pod2usage: pod2usage.PL ../lib/Config.pm
142 $(PERL) -I ../lib pod2usage.PL
143
144podchecker: podchecker.PL ../lib/Config.pm
145 $(PERL) -I ../lib podchecker.PL
146
147podselect: podselect.PL ../lib/Config.pm
148 $(PERL) -I ../lib podselect.PL
149
150perlmodlib.pod: $(PERL) perlmodlib.PL ../mv-if-diff
151 rm -f perlmodlib.tmp
152 $(PERL) -I ../lib perlmodlib.PL
153 sh ../mv-if-diff perlmodlib.tmp perlmodlib.pod
154
155compile: all
156 $(REALPERL) -I../lib ../utils/perlcc -regex 's/$$/.exe/' pod2latex pod2man pod2text checkpods -prog -verbose dcf -log ../compilelog;
157
158!NO!SUBS!