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