xref: /openbsd/gnu/usr.bin/perl/pod/Makefile.SH (revision 6fb12b70)
155745691Smillertcase $PERL_CONFIG_SH in
2c48bdce4Smillert'')
3c48bdce4Smillert	if test -f config.sh; then TOP=.;
4c48bdce4Smillert	elif test -f ../config.sh; then TOP=..;
5c48bdce4Smillert	elif test -f ../../config.sh; then TOP=../..;
6c48bdce4Smillert	elif test -f ../../../config.sh; then TOP=../../..;
7c48bdce4Smillert	elif test -f ../../../../config.sh; then TOP=../../../..;
8c48bdce4Smillert	else
9c48bdce4Smillert		echo "Can't find config.sh."; exit 1
10c48bdce4Smillert	fi
11c48bdce4Smillert	. $TOP/config.sh
12c48bdce4Smillert	;;
13c48bdce4Smillertesac
14c48bdce4Smillert: This forces SH files to create target in same directory as SH file.
15c48bdce4Smillert: This is so that make depend always knows where to find SH derivatives.
16c48bdce4Smillertcase "$0" in
17c48bdce4Smillert*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
18c48bdce4Smillertesac
19c48bdce4Smillert
20c48bdce4Smillertif test -d pod; then
21c48bdce4Smillert  cd pod || exit 1
22c48bdce4Smillertfi
23c48bdce4SmillertPOD=`echo *.pod`
24c48bdce4SmillertMAN=`echo $POD|sed 's/\.pod/\.man/g'`
25c48bdce4SmillertHTML=`echo $POD|sed 's/perltoc.pod//'|sed 's/\.pod/\.html/g'`
26c48bdce4SmillertTEX=`echo $POD|sed 's/\.pod/\.tex/g'`
27c48bdce4Smillert
28c48bdce4Smillertecho "Extracting pod/Makefile (with variable substitutions)"
29c48bdce4Smillert: This section of the file will have variable substitutions done on it.
30c48bdce4Smillert: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
31c48bdce4Smillert: Protect any dollar signs and backticks that you do not want interpreted
32c48bdce4Smillert: by putting a backslash in front.  You may delete these comments.
33c48bdce4Smillert
34c48bdce4Smillert$spitshell >Makefile <<!GROK!THIS!
35c48bdce4Smillert# pod/Makefile
36c48bdce4Smillert# This file is derived from pod/Makefile.SH.  Any changes made here will
37c48bdce4Smillert# be lost the next time you run Configure.
38c48bdce4Smillert
39c48bdce4SmillertPOD = $POD
40c48bdce4Smillert
41c48bdce4SmillertMAN = $MAN
42c48bdce4Smillert
43c48bdce4Smillert# no perltoc.html
44c48bdce4SmillertHTML = $HTML
45c48bdce4Smillert
46c48bdce4SmillertTEX  = $TEX
47c48bdce4Smillert
4855745691Smillert# The following is used to include the current directory in
4955745691Smillert# the dynamic loader path you are building a shared libperl.
5055745691SmillertLDLIBPTH = $ldlibpth
5155745691Smillert
52c48bdce4Smillert!GROK!THIS!
53c48bdce4Smillert
54c48bdce4Smillert## In the following dollars and backticks do not need the extra backslash.
55c48bdce4Smillert$spitshell >>Makefile <<'!NO!SUBS!'
56c48bdce4Smillert
57c48bdce4SmillertHTMLROOT = /	# Change this to fix cross-references in HTML
58*898184e3SsthenPOD2HTML_ARGS = --htmlroot=$(HTMLROOT) --podroot=.. --podpath=pod:lib:ext:vms
59*898184e3SsthenPOD2HTML = ../ext/Pod-Html/pod2html
60*898184e3SsthenPOD2MAN = ../cpan/podlators/pod2man
61*898184e3SsthenPODCHECKER =  ../cpan/Pod-Parser/podchecker
62c48bdce4Smillert
63c48bdce4SmillertPERL = ../miniperl
64c48bdce4SmillertPERLILIB = $(PERL) -I../lib
65c48bdce4SmillertREALPERL = ../perl
66c48bdce4Smillert
67*898184e3Ssthenall: man
68c48bdce4Smillert
69*898184e3Ssthenman:	$(POD2MAN) $(MAN)
70c48bdce4Smillert
71*898184e3Ssthenhtml:	$(POD2HTML) $(HTML)
72c48bdce4Smillert
7355745691Smillerttoc perltoc.pod:	buildtoc
74*898184e3Ssthen	$(PERLILIB) buildtoc
75c48bdce4Smillert
76c48bdce4Smillert.SUFFIXES: .pm .pod
77c48bdce4Smillert
78c48bdce4Smillert.SUFFIXES: .man
79c48bdce4Smillert
80*898184e3Ssthen.pm.man:     $(POD2MAN)
81*898184e3Ssthen	$(REALPERL) -I../lib $(POD2MAN) $*.pm >$*.man
82c48bdce4Smillert
83*898184e3Ssthen.pod.man:     $(POD2MAN)
84*898184e3Ssthen	$(REALPERL) -I../lib $(POD2MAN) $*.pod >$*.man
85c48bdce4Smillert
86c48bdce4Smillert.SUFFIXES: .html
87c48bdce4Smillert
88*898184e3Ssthen.pm.html:    $(POD2HTML)
89*898184e3Ssthen	$(PERL) -I../lib $(POD2HTML) $(POD2HTML_ARGS) --infile=$*.pm --outfile=$*.html
90c48bdce4Smillert
91*898184e3Ssthen.pod.html:    $(POD2HTML)
92*898184e3Ssthen	$(PERL) -I../lib $(POD2HTML) $(POD2HTML_ARGS) --infile=$*.pod --outfile=$*.html
93c48bdce4Smillert
94c48bdce4Smillertclean:
95c48bdce4Smillert	rm -f $(MAN)
96c48bdce4Smillert	rm -f $(HTML)
97c48bdce4Smillert	rm -f $(TEX)
98c48bdce4Smillert	rm -f pod2html-*cache
99c48bdce4Smillert	rm -f *.aux *.log *.exe
100c48bdce4Smillert
101c48bdce4Smillertrealclean:	clean
102c48bdce4Smillert
103c48bdce4Smillertdistclean:	realclean
104c48bdce4Smillert
105c48bdce4Smillertveryclean:	distclean
106c48bdce4Smillert	-rm -f *~ *.orig
107c48bdce4Smillert
108*898184e3Ssthencheck:	$(PODCHECKER)
109c48bdce4Smillert	@echo "checking..."; \
110*898184e3Ssthen	$(PERL) -I../lib $(PODCHECKER) $(POD)
111c48bdce4Smillert!NO!SUBS!
112