]> git.ipfire.org Git - people/ms/strongswan.git/blame - doc/Makefile
(no commit message)
[people/ms/strongswan.git] / doc / Makefile
CommitLineData
997358a6
MW
1# Makefile to generate various formats from HTML source
2#
3# Assumes the htmldoc utility is available.
4# This can be downloaded from www.easysw.com
5#
6# Also needs lynx(1) for HTML-to-text conversion
7
8.SUFFIXES: .png .fig
9
10FREESWANSRCDIR=..
11include ${FREESWANSRCDIR}/Makefile.inc
12
13# Format arguments for htmldoc
14F="--toclevels 4 --header 1cd"
15
16# source files in subdirectory
17# basic stuff
18a=src/intro.html src/upgrading.html src/quickstart.html \
19 src/policygroups.html src/faq.html
20
21# related
22b=src/manpages.html src/firewall.html src/trouble.html
23
24# more advanced
25c=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 \
30
31# background and reference material
32d=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
35
36# build and release related
37e=src/umltesting.html src/makecheck.html src/nightly.html
38
39sections=$a $b $c $d $e
40
41# separate HTML files built in current directory
42separate=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
50
51# various one-big-file formats
52howto=HowTo.html HowTo.ps HowTo.pdf HowTo.txt
53
54alldocs=${seperate} ${howto} index.html toc.html
55
56srcdir=..
57# where are scripts
58SCRIPTDIR=utils
59
60# where
61TESTINGDIR=${srcdir}/testing
62
63# where do we put HTML manpages?
64HMANDIR=manpage.d
65
66# default, build HTML only
67# dependencies build most of it
68# then we add index
69index.html: toc.html HowTo.html manpages src/index.html
70 cp src/index.html index.html
71
72# separate files plus table of contents
73# and then remove HTML formatting added by htmldoc
74toc.html : $(sections)
75 @htmldoc -t html --path ".;${TESTINGDIR}/doc" -d . $(sections)
76 @$(SCRIPTDIR)/cleanhtml.sh $(SCRIPTDIR)/cleanhtml.sed $(separate)
77
78# one big HTML file
79HowTo.html : $(sections)
80 @htmldoc -t html --toclevels 4 --header ' cf' -f $@ $(sections)
81
82# other HowTo formats
83HowTo.txt: HowTo.html
84 lynx -dump $< > $@
85
86HowTo.ps : $(sections)
87 htmldoc -f $@ $(sections)
88
89HowTo.pdf : $(sections)
90 @htmldoc -f $@ $(sections)
91
92manpages: manp
93
94manp: $(SCRIPTDIR)/mkhtmlman
95 @$(SCRIPTDIR)/mkhtmlman $(HMANDIR) `find ../programs ../lib ../linux -type f -name '*.[1-8]' -print | grep -v lwres | grep -v CVS`
96
97programs:
98
99all: #$(howto) $(manpages) index.html
100
101clean:
102 @rm -f $(howto) $(separate) toc.html index.html
103 @rm -rf $(HMANDIR)
104
105install:
106#install: ${alldocs} manpages
107# @mkdir -p ${DOCDIR}
108# @$(foreach f, $(alldocs), \
109# $(INSTALL) $f ${DOCDIR} || exit 1;\
110# )
111# @find ${HMANDIR} -type f -name "*.html" -print | while read file; \
112# do \
113# $(INSTALL) $$file ${DOCDIR} || exit 1;\
114# done;
115
116install_file_list:
117 @$(foreach f, $(alldocs), \
118 echo ${DOCDIR}/$f; \
119 )
120 @if [ -d ${HMANDIR} ]; then find ${HMANDIR} -type f -name "*.html" -print | while read file; \
121 do \
122 echo ${DOCDIR}/$$file; \
123 done; fi;
124
125checkprograms: ;
126
127check: ;
128
129# not enabled by default, because xml2rfc must be installed first.
130drafts: draft-richardson-ipsec-opportunistic.txt src/draft-richardson-ipsec-opportunistic.html \
131 draft-richardson-ipsec-rr.txt src/draft-richardson-ipsec-rr.html
132
133draft-richardson-ipsec-opportunistic.txt: src/draft-richardson-ipsec-opportunistic.xml
134 XML_LIBRARY=$(XML_LIBRARY):./src xml2rfc xml2rfc $? $@
135
136draft-richardson-ipsec-rr.txt: src/draft-richardson-ipsec-rr.xml
137 XML_LIBRARY=$(XML_LIBRARY):./src xml2rfc xml2rfc $? $@
138
139draft-%.nr: src/draft-%.xml
140 XML_LIBRARY=$(XML_LIBRARY):./src xml2rfc xml2nroff $? $@
141
142draft-%.html: draft-%.xml
143 XML_LIBRARY=$(XML_LIBRARY):./src xml2rfc xml2html $? $@
144
145
146.fig.eps:
147 fig2dev -L ps $< $@
148
149.fig.png:
150 fig2dev -L png $< $@
151
152single_netjig.png: testing/single_netjig.fig
153multi_netjig.png: testing/multi_netjig.fig
154
155makecheck.html: single_netjig.png multi_netjig.png
156
157#
158# DocBook based documentation
159#
160xmldocs: mast.html klips/mast.4
161
162mast.html: klips/mast.xml
163 xmlto html klips/mast.xml
164
165klips/mast.4: klips/mast.xml
166 xmlto -o klips man klips/mast.xml
167