]> git.wh0rd.org - fontconfig.git/blame - doc/Makefile.am
Verify documentation covers exposed symbols.
[fontconfig.git] / doc / Makefile.am
CommitLineData
394b2bf0
KP
1#
2# $Id$
3#
4# Copyright © 2003 Keith Packard
5#
6# Permission to use, copy, modify, distribute, and sell this software and its
7# documentation for any purpose is hereby granted without fee, provided that
8# the above copyright notice appear in all copies and that both that
9# copyright notice and this permission notice appear in supporting
10# documentation, and that the name of Keith Packard not be used in
11# advertising or publicity pertaining to distribution of the software without
12# specific, written prior permission. Keith Packard makes no
13# representations about the suitability of this software for any purpose. It
14# is provided "as is" without express or implied warranty.
15#
16# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22# PERFORMANCE OF THIS SOFTWARE.
23
d8ae9c92
KP
24CC = @CC_FOR_BUILD@
25EXEEXT = @EXEEXT_FOR_BUILD@
26LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
27
4cbc3ee8 28DOC_SRC = $(srcdir)
b219ac6b
KP
29DOC_MODULE = fontconfig
30DOC2HTML = docbook2html
31DOC2TXT = docbook2txt
32DOC2MAN = docbook2man
0c009d2b 33DOC2PDF = docbook2pdf
0da305f7 34
b219ac6b 35TXT = fontconfig-user.txt fontconfig-devel.txt
0c009d2b 36PDF = fontconfig-user.pdf fontconfig-devel.pdf
b219ac6b 37HTML_FILES = fontconfig-user.html
4cbc3ee8
KP
38HTML_DIR = fontconfig-devel
39SGML = fontconfig-user.sgml fontconfig-devel.sgml
394b2bf0 40FNCS_TMPL = ${DOC_SRC}/func.sgml
0da305f7 41
22671e25 42DOC_FUNCS_FNCS=\
b219ac6b
KP
43 fcatomic.fncs \
44 fcblanks.fncs \
22671e25 45 fccharset.fncs \
b219ac6b
KP
46 fcconfig.fncs \
47 fcconstant.fncs \
48 fcfile.fncs \
bfc2dc3a 49 fcfontset.fncs \
b219ac6b
KP
50 fcfreetype.fncs \
51 fcinit.fncs \
52 fcmatrix.fncs \
bfc2dc3a
KP
53 fcobjectset.fncs \
54 fcobjecttype.fncs \
b219ac6b
KP
55 fcpattern.fncs \
56 fcstring.fncs \
39381776 57 fcstrset.fncs \
b219ac6b 58 fcvalue.fncs
34cd0514 59
22671e25 60DOC_FUNCS_SGML=\
b219ac6b
KP
61 fcatomic.sgml \
62 fcblanks.sgml \
22671e25 63 fccharset.sgml \
b219ac6b
KP
64 fcconfig.sgml \
65 fcconstant.sgml \
66 fcfile.sgml \
bfc2dc3a 67 fcfontset.sgml \
b219ac6b
KP
68 fcfreetype.sgml \
69 fcinit.sgml \
70 fcmatrix.sgml \
bfc2dc3a
KP
71 fcobjectset.sgml \
72 fcobjecttype.sgml \
b219ac6b
KP
73 fcpattern.sgml \
74 fcstring.sgml \
39381776 75 fcstrset.sgml \
b219ac6b
KP
76 fcvalue.sgml
77
dc2e06ab
KP
78man5_MANS=fonts-conf.5
79man3_MANS=$(DOCMAN3)
22671e25
KP
80
81noinst_PROGRAMS=edit-sgml
82edit_sgml_SOURCES=edit-sgml.c
83
4cbc3ee8 84docdir=@DOCDIR@
0da305f7 85
0c009d2b 86DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
dc2e06ab 87LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/*
bdc0fd54 88
9a54f8a1
KP
89check_SCRIPTS=check-missing-doc
90TESTS_ENVIRONMENT=top_srcdir=${top_srcdir} sh
91TESTS=check-missing-doc
92
93EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(check_SCRIPTS) func.sgml confdir.sgml.in
34cd0514 94
22671e25 95SUFFIXES=.fncs .sgml .txt .html
0da305f7 96
2b45ef3a 97if USEDOCBOOK
bdc0fd54 98
22671e25 99.fncs.sgml:
0da305f7 100 $(RM) $@
d8ae9c92 101 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
0da305f7
KP
102
103.sgml.txt:
104 $(RM) $@
394b2bf0 105 $(DOC2TXT) $<
0da305f7 106
0c009d2b
KP
107.sgml.pdf:
108 $(RM) $@
109 $(DOC2PDF) $<
110
dc2e06ab 111$(man3_MANS): func.refs
9238fc06 112
4cbc3ee8 113func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
b219ac6b 114 $(RM) func.refs
28a4ea7f 115 $(DOC2MAN) local-fontconfig-devel.sgml && \
b219ac6b
KP
116 mv manpage.refs func.refs
117 $(RM) manpage.links
22671e25 118
4cbc3ee8
KP
119local-fontconfig-devel.sgml: fontconfig-devel.sgml
120 $(LN_S) $< $@
121
d8ae9c92 122$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
22671e25 123
4cbc3ee8
KP
124fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
125 $(RM) $@
89d6119c 126 $(DOC2MAN) local-fontconfig-user.sgml && \
b219ac6b 127 $(RM) manpage.refs manpage.links
4cbc3ee8
KP
128
129local-fontconfig-user.sgml: fontconfig-user.sgml
130 $(LN_S) $< $@
b219ac6b 131
4484582e 132all-local: $(LOCAL_DOCS)
22671e25 133
4484582e 134clean-local:
dc2e06ab 135 $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
4cbc3ee8 136 $(RM) -r $(HTML_DIR)
22671e25 137
4cbc3ee8
KP
138$(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
139 $(RM) -r $(HTML_DIR)
140 $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml
394b2bf0 141
dc2e06ab 142fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
4cbc3ee8
KP
143 $(RM) $@
144 $(DOC2TXT) local-fontconfig-devel.sgml
145 mv local-fontconfig-devel.txt $@
394b2bf0 146
dc2e06ab 147fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
0c009d2b 148 $(RM) $@
2cae0512 149 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
af2ad236
PL
150 || echo Failed to generate $@ >&2; \
151 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
0c009d2b 152
4cbc3ee8
KP
153fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
154 $(RM) $@ local-$@ $@.tmp
155 $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
156 -test -f local-$@ && mv local-$@ $@
157 -test -f $@ || mv $@.tmp $@
408dd9c0 158 -test -f $@.tmp && $(RM) $@.tmp
394b2bf0 159
4cbc3ee8
KP
160fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
161 $(RM) $@
162 $(DOC2TXT) local-fontconfig-user.sgml
163 mv local-fontconfig-user.txt $@
4b4f42ab 164
0c009d2b
KP
165fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
166 $(RM) $@
2cae0512 167 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
af2ad236
PL
168 || echo Failed to generate $@ >&2; \
169 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
0c009d2b 170
f946755c 171STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
394b2bf0
KP
172confdir.sgml: ${DOC_SRC}/confdir.sgml.in
173 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
174
4cbc3ee8 175CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
4b4f42ab 176
2cae0512
PB
177htmldoc_DATA = $(HTML_DIR)/*
178
179$(HTML_DIR)/*: $(HTML_DIR)
180
bdc0fd54 181else
2cae0512
PB
182
183htmldoc_DATA = $(srcdir)/$(HTML_DIR)/*
184
bdc0fd54
KP
185all-local:
186clean-local:
187endif
188
4cbc3ee8
KP
189htmldocdir=$(docdir)/$(HTML_DIR)
190
191doc_DATA = $(DOC_FILES)
192