]> git.ipfire.org Git - thirdparty/strongswan.git/blob - doc/Makefile
- moved RFCs from ikev2 into doc dir
[thirdparty/strongswan.git] / doc / Makefile
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
10 FREESWANSRCDIR=..
11 include ${FREESWANSRCDIR}/Makefile.inc
12
13 # Format arguments for htmldoc
14 F="--toclevels 4 --header 1cd"
15
16 # source files in subdirectory
17 # basic stuff
18 a=src/intro.html src/upgrading.html src/quickstart.html \
19 src/policygroups.html src/faq.html
20
21 # related
22 b=src/manpages.html src/firewall.html src/trouble.html
23
24 # more advanced
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 \
30
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
35
36 # build and release related
37 e=src/umltesting.html src/makecheck.html src/nightly.html
38
39 sections=$a $b $c $d $e
40
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
50
51 # various one-big-file formats
52 howto=HowTo.html HowTo.ps HowTo.pdf HowTo.txt
53
54 alldocs=${seperate} ${howto} index.html toc.html
55
56 srcdir=..
57 # where are scripts
58 SCRIPTDIR=utils
59
60 # where
61 TESTINGDIR=${srcdir}/testing
62
63 # where do we put HTML manpages?
64 HMANDIR=manpage.d
65
66 # default, build HTML only
67 # dependencies build most of it
68 # then we add index
69 index.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
74 toc.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
79 HowTo.html : $(sections)
80 @htmldoc -t html --toclevels 4 --header ' cf' -f $@ $(sections)
81
82 # other HowTo formats
83 HowTo.txt: HowTo.html
84 lynx -dump $< > $@
85
86 HowTo.ps : $(sections)
87 htmldoc -f $@ $(sections)
88
89 HowTo.pdf : $(sections)
90 @htmldoc -f $@ $(sections)
91
92 manpages: manp
93
94 manp: $(SCRIPTDIR)/mkhtmlman
95 @$(SCRIPTDIR)/mkhtmlman $(HMANDIR) `find ../programs ../lib ../linux -type f -name '*.[1-8]' -print | grep -v lwres | grep -v CVS`
96
97 programs:
98
99 all: #$(howto) $(manpages) index.html
100
101 clean:
102 @rm -f $(howto) $(separate) toc.html index.html
103 @rm -rf $(HMANDIR)
104
105 install:
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
116 install_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
125 checkprograms: ;
126
127 check: ;
128
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
132
133 draft-richardson-ipsec-opportunistic.txt: src/draft-richardson-ipsec-opportunistic.xml
134 XML_LIBRARY=$(XML_LIBRARY):./src xml2rfc xml2rfc $? $@
135
136 draft-richardson-ipsec-rr.txt: src/draft-richardson-ipsec-rr.xml
137 XML_LIBRARY=$(XML_LIBRARY):./src xml2rfc xml2rfc $? $@
138
139 draft-%.nr: src/draft-%.xml
140 XML_LIBRARY=$(XML_LIBRARY):./src xml2rfc xml2nroff $? $@
141
142 draft-%.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
152 single_netjig.png: testing/single_netjig.fig
153 multi_netjig.png: testing/multi_netjig.fig
154
155 makecheck.html: single_netjig.png multi_netjig.png
156
157 #
158 # DocBook based documentation
159 #
160 xmldocs: mast.html klips/mast.4
161
162 mast.html: klips/mast.xml
163 xmlto html klips/mast.xml
164
165 klips/mast.4: klips/mast.xml
166 xmlto -o klips man klips/mast.xml
167