]> git.wh0rd.org - fontconfig.git/blame - doc/Makefile.am
Document previously undocumented functions. (bug 12963)
[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 \
a190678e 45 fccache.fncs \
22671e25 46 fccharset.fncs \
b219ac6b
KP
47 fcconfig.fncs \
48 fcconstant.fncs \
a190678e 49 fcdircache.fncs \
b219ac6b 50 fcfile.fncs \
bfc2dc3a 51 fcfontset.fncs \
b219ac6b
KP
52 fcfreetype.fncs \
53 fcinit.fncs \
a190678e 54 fclangset.fncs \
b219ac6b 55 fcmatrix.fncs \
bfc2dc3a
KP
56 fcobjectset.fncs \
57 fcobjecttype.fncs \
b219ac6b
KP
58 fcpattern.fncs \
59 fcstring.fncs \
39381776 60 fcstrset.fncs \
b219ac6b 61 fcvalue.fncs
34cd0514 62
22671e25 63DOC_FUNCS_SGML=\
b219ac6b
KP
64 fcatomic.sgml \
65 fcblanks.sgml \
22671e25 66 fccharset.sgml \
b219ac6b
KP
67 fcconfig.sgml \
68 fcconstant.sgml \
69 fcfile.sgml \
bfc2dc3a 70 fcfontset.sgml \
b219ac6b
KP
71 fcfreetype.sgml \
72 fcinit.sgml \
73 fcmatrix.sgml \
bfc2dc3a
KP
74 fcobjectset.sgml \
75 fcobjecttype.sgml \
b219ac6b
KP
76 fcpattern.sgml \
77 fcstring.sgml \
39381776 78 fcstrset.sgml \
b219ac6b
KP
79 fcvalue.sgml
80
dc2e06ab
KP
81man5_MANS=fonts-conf.5
82man3_MANS=$(DOCMAN3)
22671e25
KP
83
84noinst_PROGRAMS=edit-sgml
85edit_sgml_SOURCES=edit-sgml.c
86
4cbc3ee8 87docdir=@DOCDIR@
0da305f7 88
0c009d2b 89DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
dc2e06ab 90LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/*
bdc0fd54 91
9a54f8a1
KP
92check_SCRIPTS=check-missing-doc
93TESTS_ENVIRONMENT=top_srcdir=${top_srcdir} sh
94TESTS=check-missing-doc
95
96EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(check_SCRIPTS) func.sgml confdir.sgml.in
34cd0514 97
22671e25 98SUFFIXES=.fncs .sgml .txt .html
0da305f7 99
2b45ef3a 100if USEDOCBOOK
bdc0fd54 101
22671e25 102.fncs.sgml:
0da305f7 103 $(RM) $@
d8ae9c92 104 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
0da305f7
KP
105
106.sgml.txt:
107 $(RM) $@
394b2bf0 108 $(DOC2TXT) $<
0da305f7 109
0c009d2b
KP
110.sgml.pdf:
111 $(RM) $@
112 $(DOC2PDF) $<
113
dc2e06ab 114$(man3_MANS): func.refs
9238fc06 115
4cbc3ee8 116func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
b219ac6b 117 $(RM) func.refs
28a4ea7f 118 $(DOC2MAN) local-fontconfig-devel.sgml && \
b219ac6b
KP
119 mv manpage.refs func.refs
120 $(RM) manpage.links
22671e25 121
4cbc3ee8
KP
122local-fontconfig-devel.sgml: fontconfig-devel.sgml
123 $(LN_S) $< $@
124
d8ae9c92 125$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
22671e25 126
4cbc3ee8
KP
127fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
128 $(RM) $@
89d6119c 129 $(DOC2MAN) local-fontconfig-user.sgml && \
b219ac6b 130 $(RM) manpage.refs manpage.links
4cbc3ee8
KP
131
132local-fontconfig-user.sgml: fontconfig-user.sgml
133 $(LN_S) $< $@
b219ac6b 134
4484582e 135all-local: $(LOCAL_DOCS)
22671e25 136
4484582e 137clean-local:
dc2e06ab 138 $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
4cbc3ee8 139 $(RM) -r $(HTML_DIR)
22671e25 140
4cbc3ee8
KP
141$(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
142 $(RM) -r $(HTML_DIR)
143 $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml
394b2bf0 144
dc2e06ab 145fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
4cbc3ee8
KP
146 $(RM) $@
147 $(DOC2TXT) local-fontconfig-devel.sgml
148 mv local-fontconfig-devel.txt $@
394b2bf0 149
dc2e06ab 150fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
0c009d2b 151 $(RM) $@
2cae0512 152 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
af2ad236
PL
153 || echo Failed to generate $@ >&2; \
154 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
0c009d2b 155
4cbc3ee8
KP
156fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
157 $(RM) $@ local-$@ $@.tmp
158 $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
159 -test -f local-$@ && mv local-$@ $@
160 -test -f $@ || mv $@.tmp $@
408dd9c0 161 -test -f $@.tmp && $(RM) $@.tmp
394b2bf0 162
4cbc3ee8
KP
163fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
164 $(RM) $@
165 $(DOC2TXT) local-fontconfig-user.sgml
166 mv local-fontconfig-user.txt $@
4b4f42ab 167
0c009d2b
KP
168fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
169 $(RM) $@
2cae0512 170 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
af2ad236
PL
171 || echo Failed to generate $@ >&2; \
172 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
0c009d2b 173
f946755c 174STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
394b2bf0
KP
175confdir.sgml: ${DOC_SRC}/confdir.sgml.in
176 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
177
4cbc3ee8 178CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
4b4f42ab 179
2cae0512
PB
180htmldoc_DATA = $(HTML_DIR)/*
181
182$(HTML_DIR)/*: $(HTML_DIR)
183
bdc0fd54 184else
2cae0512
PB
185
186htmldoc_DATA = $(srcdir)/$(HTML_DIR)/*
187
bdc0fd54
KP
188all-local:
189clean-local:
190endif
191
4cbc3ee8
KP
192htmldocdir=$(docdir)/$(HTML_DIR)
193
194doc_DATA = $(DOC_FILES)
195