1 # Makefile to generate various formats from HTML source
3 # Assumes the htmldoc utility is available.
4 # This can be downloaded from www.easysw.com
6 # Also needs lynx(1) for HTML-to-text conversion
11 include ${FREESWANSRCDIR}/Makefile.inc
13 # Format arguments for htmldoc
14 F
="--toclevels 4 --header 1cd"
16 # source files in subdirectory
18 a
=src
/intro.html src
/upgrading.html src
/quickstart.html \
19 src
/policygroups.html src
/faq.html
22 b
=src
/manpages.html src
/firewall.html src
/trouble.html
25 c
=src
/compat.html src
/interop.html src
/performance.html \
26 src
/testing.html src
/kernel.html src
/adv_config.html \
27 src
/install.html src
/config.html \
28 src
/background.html src
/user_examples.html \
29 src
/makecheck.html src
/umltesting.html \
31 # background and reference material
32 d
=src
/politics.html src
/ipsec.html \
33 src
/mail.html src
/web.html src
/glossary.html src
/biblio.html \
34 src
/rfc.html src
/roadmap.html
36 # build and release related
37 e
=src
/umltesting.html src
/makecheck.html src
/nightly.html
39 sections
=$a $b $c $d $e
41 # separate HTML files built in current directory
42 separate
=intro.html
install.html config.html manpages.html \
43 firewall.html trouble.html kernel.html roadmap.html \
44 compat.html interop.html politics.html ipsec.html \
45 mail.html performance.html testing.html web.html \
46 glossary.html biblio.html rfc.html faq.html \
47 adv_config.html user_examples.html background.html \
48 quickstart.html umltesting.html makecheck.html nightly.html \
49 upgrading.html policygroups.html
51 # various one-big-file formats
52 howto
=HowTo.html HowTo.ps HowTo.pdf HowTo.txt
54 alldocs
=${seperate} ${howto} index.html toc.html
61 TESTINGDIR
=${srcdir}/testing
63 # where do we put HTML manpages?
66 # default, build HTML only
67 # dependencies build most of it
69 index.html
: toc.html HowTo.html manpages src
/index.html
70 cp src
/index.html index.html
72 # separate files plus table of contents
73 # and then remove HTML formatting added by htmldoc
74 toc.html
: $(sections
)
75 @htmldoc
-t html
--path
".;${TESTINGDIR}/doc" -d .
$(sections
)
76 @
$(SCRIPTDIR
)/cleanhtml.sh
$(SCRIPTDIR
)/cleanhtml.sed
$(separate
)
79 HowTo.html
: $(sections
)
80 @htmldoc
-t html
--toclevels
4 --header
' cf' -f
$@
$(sections
)
86 HowTo.ps
: $(sections
)
87 htmldoc
-f
$@
$(sections
)
89 HowTo.pdf
: $(sections
)
90 @htmldoc
-f
$@
$(sections
)
94 manp
: $(SCRIPTDIR
)/mkhtmlman
95 @
$(SCRIPTDIR
)/mkhtmlman
$(HMANDIR
) `find ../programs ../lib ../linux -type f -name '*.[1-8]' -print | grep -v lwres | grep -v CVS`
99 all: #$(howto) $(manpages) index.html
102 @
rm -f
$(howto
) $(separate
) toc.html index.html
106 #install: ${alldocs} manpages
107 # @mkdir -p ${DOCDIR}
108 # @$(foreach f, $(alldocs), \
109 # $(INSTALL) $f ${DOCDIR} || exit 1;\
111 # @find ${HMANDIR} -type f -name "*.html" -print | while read file; \
113 # $(INSTALL) $$file ${DOCDIR} || exit 1;\
117 @
$(foreach f
, $(alldocs
), \
120 @if
[ -d
${HMANDIR} ]; then find
${HMANDIR} -type f
-name
"*.html" -print | while read file
; \
122 echo
${DOCDIR}/$$file; \
129 # not enabled by default, because xml2rfc must be installed first.
130 drafts
: draft-richardson-ipsec-opportunistic.txt src
/draft-richardson-ipsec-opportunistic.html \
131 draft-richardson-ipsec-rr.txt src
/draft-richardson-ipsec-rr.html
133 draft-richardson-ipsec-opportunistic.txt
: src
/draft-richardson-ipsec-opportunistic.xml
134 XML_LIBRARY
=$(XML_LIBRARY
):.
/src xml2rfc xml2rfc
$?
$@
136 draft-richardson-ipsec-rr.txt
: src
/draft-richardson-ipsec-rr.xml
137 XML_LIBRARY
=$(XML_LIBRARY
):.
/src xml2rfc xml2rfc
$?
$@
139 draft-
%.nr
: src
/draft-
%.xml
140 XML_LIBRARY
=$(XML_LIBRARY
):.
/src xml2rfc xml2nroff
$?
$@
142 draft-
%.html
: draft-
%.xml
143 XML_LIBRARY
=$(XML_LIBRARY
):.
/src xml2rfc xml2html
$?
$@
152 single_netjig.png
: testing
/single_netjig.fig
153 multi_netjig.png
: testing
/multi_netjig.fig
155 makecheck.html
: single_netjig.png multi_netjig.png
158 # DocBook based documentation
160 xmldocs
: mast.html klips
/mast
.4
162 mast.html
: klips
/mast.xml
163 xmlto html klips
/mast.xml
165 klips
/mast
.4: klips
/mast.xml
166 xmlto
-o klips man klips
/mast.xml