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 | ||
4755096e | 57 | HTMLROOT = / # Change this to fix cross-references in HTML |
33c64ab2 | 58 | POD2HTML_ARGS = --htmlroot=$(HTMLROOT) \ |
4755096e GS |
59 | --podroot=.. --podpath=pod:lib:ext:vms \ |
60 | --libpods=perlfunc:perlguts:perlvar:perlrun:perlop | |
33c64ab2 | 61 | POD2HTML = ../ext/Pod-Html/pod2html |
bab7aada | 62 | POD2MAN = ../cpan/podlators/pod2man |
bf07e08f | 63 | POD2LATEX = ../cpan/Pod-LaTeX/pod2latex |
cde5101a | 64 | PODCHECKER = ../cpan/Pod-Parser/podchecker |
4755096e GS |
65 | |
66 | PERL = ../miniperl | |
2607bbb4 | 67 | PERLILIB = $(PERL) -I../lib |
4755096e GS |
68 | REALPERL = ../perl |
69 | ||
33c64ab2 | 70 | all: man |
4755096e | 71 | |
bab7aada | 72 | man: $(POD2MAN) $(MAN) |
4755096e | 73 | |
33c64ab2 | 74 | html: $(POD2HTML) $(HTML) |
4755096e | 75 | |
bf07e08f | 76 | tex: $(POD2LATEX) $(TEX) |
4755096e | 77 | |
1fa7ca25 | 78 | toc perltoc.pod: buildtoc |
1db354ff | 79 | $(PERLILIB) buildtoc --build-toc |
4755096e GS |
80 | |
81 | .SUFFIXES: .pm .pod | |
82 | ||
83 | .SUFFIXES: .man | |
84 | ||
bab7aada NC |
85 | .pm.man: $(POD2MAN) |
86 | $(REALPERL) -I../lib $(POD2MAN) $*.pm >$*.man | |
4755096e | 87 | |
bab7aada NC |
88 | .pod.man: $(POD2MAN) |
89 | $(REALPERL) -I../lib $(POD2MAN) $*.pod >$*.man | |
4755096e GS |
90 | |
91 | .SUFFIXES: .html | |
92 | ||
33c64ab2 NC |
93 | .pm.html: $(POD2HTML) |
94 | $(PERL) -I../lib $(POD2HTML) $(POD2HTML_ARGS) --infile=$*.pm --outfile=$*.html | |
4755096e | 95 | |
33c64ab2 NC |
96 | .pod.html: $(POD2HTML) |
97 | $(PERL) -I../lib $(POD2HTML) $(POD2HTML_ARGS) --infile=$*.pod --outfile=$*.html | |
4755096e GS |
98 | |
99 | .SUFFIXES: .tex | |
100 | ||
bf07e08f NC |
101 | .pm.tex: $(POD2LATEX) |
102 | $(PERL) -I../lib $(POD2LATEX) $*.pm | |
4755096e | 103 | |
bf07e08f NC |
104 | .pod.tex: $(POD2LATEX) |
105 | $(PERL) -I../lib $(POD2LATEX) $*.pod | |
4755096e GS |
106 | |
107 | clean: | |
108 | rm -f $(MAN) | |
109 | rm -f $(HTML) | |
110 | rm -f $(TEX) | |
111 | rm -f pod2html-*cache | |
112 | rm -f *.aux *.log *.exe | |
113 | ||
114 | realclean: clean | |
4755096e GS |
115 | |
116 | distclean: realclean | |
117 | ||
2edbd6da JH |
118 | veryclean: distclean |
119 | -rm -f *~ *.orig | |
120 | ||
cde5101a | 121 | check: $(PODCHECKER) |
4755096e | 122 | @echo "checking..."; \ |
cde5101a | 123 | $(PERL) -I../lib $(PODCHECKER) $(POD) |
4755096e | 124 | !NO!SUBS! |