A new version of making the syslog test more robust.
[p5sagit/p5-mst-13.2.git] / pod / Makefile.SH
CommitLineData
4755096e 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'`
e788edff 25HTML=`echo $POD|sed 's/perltoc.pod//'|sed 's/\.pod/\.html/g'`
4755096e 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
c2e66d9e 48# The following is used to include the current directory in
49# the dynamic loader path you are building a shared libperl.
50LDLIBPTH = $ldlibpth
51
4755096e 52!GROK!THIS!
53
54## In the following dollars and backticks do not need the extra backslash.
55$spitshell >>Makefile <<'!NO!SUBS!'
56
57CONVERTERS = pod2html pod2latex pod2man pod2text checkpods \
58 pod2usage podchecker podselect
59
60HTMLROOT = / # Change this to fix cross-references in HTML
61POD2HTML = pod2html \
62 --htmlroot=$(HTMLROOT) \
63 --podroot=.. --podpath=pod:lib:ext:vms \
64 --libpods=perlfunc:perlguts:perlvar:perlrun:perlop
65
66PERL = ../miniperl
67REALPERL = ../perl
68
69all: $(CONVERTERS) man
70
71converters: $(CONVERTERS)
72
73regen_pods: perlmodlib.pod toc
74
c2e66d9e 75buildtoc: buildtoc.PL perl.pod ../MANIFEST
a7ffa9b9 76 $(PERL) buildtoc.PL
77
78perltoc.pod: buildtoc
4755096e 79
80man: pod2man $(MAN)
81
82html: pod2html $(HTML)
83
84tex: pod2latex $(TEX)
85
c2e66d9e 86toc: buildtoc
a7ffa9b9 87 $(PERL) buildtoc
4755096e 88
89.SUFFIXES: .pm .pod
90
91.SUFFIXES: .man
92
93.pm.man: pod2man
94 $(PERL) -I../lib pod2man $*.pm >$*.man
95
96.pod.man: pod2man
97 $(PERL) -I../lib pod2man $*.pod >$*.man
98
99.SUFFIXES: .html
100
101.pm.html: pod2html
102 $(PERL) -I../lib $(POD2HTML) --infile=$*.pm --outfile=$*.html
103
104.pod.html: pod2html
105 $(PERL) -I../lib $(POD2HTML) --infile=$*.pod --outfile=$*.html
106
107.SUFFIXES: .tex
108
109.pm.tex: pod2latex
110 $(PERL) -I../lib pod2latex $*.pm
111
112.pod.tex: pod2latex
113 $(PERL) -I../lib pod2latex $*.pod
114
115clean:
116 rm -f $(MAN)
117 rm -f $(HTML)
118 rm -f $(TEX)
119 rm -f pod2html-*cache
120 rm -f *.aux *.log *.exe
121
122realclean: clean
123 rm -f $(CONVERTERS)
124
125distclean: realclean
126
2edbd6da 127veryclean: distclean
128 -rm -f *~ *.orig
129
4755096e 130check: checkpods
131 @echo "checking..."; \
132 $(PERL) -I../lib checkpods $(POD)
133
134# Dependencies.
135pod2latex: pod2latex.PL ../lib/Config.pm
c2e66d9e 136 $(LDLIBPTH) $(PERL) -I../lib pod2latex.PL
4755096e 137
138pod2html: pod2html.PL ../lib/Config.pm
c2e66d9e 139 $(LDLIBPTH) $(PERL) -I ../lib pod2html.PL
4755096e 140
141pod2man: pod2man.PL ../lib/Config.pm
c2e66d9e 142 $(LDLIBPTH) $(PERL) -I ../lib pod2man.PL
4755096e 143
144pod2text: pod2text.PL ../lib/Config.pm
c2e66d9e 145 $(LDLIBPTH) $(PERL) -I ../lib pod2text.PL
4755096e 146
147checkpods: checkpods.PL ../lib/Config.pm
c2e66d9e 148 $(LDLIBPTH) $(PERL) -I ../lib checkpods.PL
4755096e 149
150pod2usage: pod2usage.PL ../lib/Config.pm
151 $(PERL) -I ../lib pod2usage.PL
152
153podchecker: podchecker.PL ../lib/Config.pm
154 $(PERL) -I ../lib podchecker.PL
155
156podselect: podselect.PL ../lib/Config.pm
157 $(PERL) -I ../lib podselect.PL
158
159perlmodlib.pod: $(PERL) perlmodlib.PL ../mv-if-diff
160 rm -f perlmodlib.tmp
161 $(PERL) -I ../lib perlmodlib.PL
162 sh ../mv-if-diff perlmodlib.tmp perlmodlib.pod
163
164compile: all
165 $(REALPERL) -I../lib ../utils/perlcc -regex 's/$$/.exe/' pod2latex pod2man pod2text checkpods -prog -verbose dcf -log ../compilelog;
166
167!NO!SUBS!