source: trunk/third/perl/pod/Makefile.SH @ 17035

Revision 17035, 3.9 KB checked in by zacheiss, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17034, which included commits to RCS files with non-trunk default branches.
Line 
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/\.html/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
63PERLILIB = $(PERL) -I../lib
64REALPERL = ../perl
65
66all: $(CONVERTERS) man
67
68converters: $(CONVERTERS)
69
70regen_pods: perlmodlib.pod toc
71
72buildtoc:       buildtoc.PL perl.pod ../MANIFEST
73        $(PERLILIB) buildtoc.PL
74
75perltoc.pod:    buildtoc
76
77man:    pod2man $(MAN)
78
79html:   pod2html $(HTML)
80
81tex:    pod2latex $(TEX)
82
83toc:    buildtoc
84        $(PERLILIB) buildtoc
85
86.SUFFIXES: .pm .pod
87
88.SUFFIXES: .man
89
90.pm.man:     pod2man
91        $(PERL) -I../lib pod2man $*.pm >$*.man
92
93.pod.man:     pod2man
94        $(PERL) -I../lib pod2man $*.pod >$*.man
95
96.SUFFIXES: .html
97
98.pm.html:    pod2html
99        $(PERL) -I../lib $(POD2HTML) --infile=$*.pm --outfile=$*.html
100
101.pod.html:    pod2html
102        $(PERL) -I../lib $(POD2HTML) --infile=$*.pod --outfile=$*.html
103
104.SUFFIXES: .tex
105
106.pm.tex: pod2latex
107        $(PERL) -I../lib pod2latex $*.pm
108
109.pod.tex: pod2latex
110        $(PERL) -I../lib pod2latex $*.pod
111
112clean:
113        rm -f $(MAN)
114        rm -f $(HTML)
115        rm -f $(TEX)
116        rm -f pod2html-*cache
117        rm -f *.aux *.log *.exe
118
119realclean:      clean
120        rm -f $(CONVERTERS)
121
122distclean:      realclean
123
124veryclean:      distclean
125        -rm -f *~ *.orig
126
127check:  checkpods
128        @echo "checking..."; \
129        $(PERL) -I../lib checkpods $(POD)
130
131# Dependencies.
132pod2latex:      pod2latex.PL ../lib/Config.pm
133        $(PERL) -I../lib pod2latex.PL
134
135pod2html:       pod2html.PL ../lib/Config.pm
136        $(PERL) -I ../lib pod2html.PL
137
138pod2man:        pod2man.PL ../lib/Config.pm
139        $(PERL) -I ../lib pod2man.PL
140
141pod2text:       pod2text.PL ../lib/Config.pm
142        $(PERL) -I ../lib pod2text.PL
143
144checkpods:      checkpods.PL ../lib/Config.pm
145        $(PERL) -I ../lib checkpods.PL
146
147pod2usage:      pod2usage.PL ../lib/Config.pm
148        $(PERL) -I ../lib pod2usage.PL
149
150podchecker:     podchecker.PL ../lib/Config.pm
151        $(PERL) -I ../lib podchecker.PL
152
153podselect:      podselect.PL ../lib/Config.pm
154        $(PERL) -I ../lib podselect.PL
155
156perlmodlib.pod: $(PERL) perlmodlib.PL ../mv-if-diff
157        rm -f perlmodlib.tmp
158        $(PERL) -I ../lib perlmodlib.PL
159        sh ../mv-if-diff perlmodlib.tmp perlmodlib.pod
160
161compile: all
162        $(REALPERL) -I../lib ../utils/perlcc -o pod2latex.exe pod2latex -log ../compilelog
163        $(REALPERL) -I../lib ../utils/perlcc -o pod2man.exe pod2man -log ../compilelog
164        $(REALPERL) -I../lib ../utils/perlcc -o pod2text.exe pod2text -log ../compilelog
165        $(REALPERL) -I../lib ../utils/perlcc -o checkpods.exe checkpods -log ../compilelog
166
167!NO!SUBS!
Note: See TracBrowser for help on using the repository browser.