]> git.wh0rd.org - fontconfig.git/blame_incremental - doc/Makefile.am
Fix parallel build in doc directory.
[fontconfig.git] / doc / Makefile.am
... / ...
CommitLineData
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
24CC = @CC_FOR_BUILD@
25EXEEXT = @EXEEXT_FOR_BUILD@
26LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
27
28DOC_SRC = $(srcdir)
29DOC_MODULE = fontconfig
30DOC2HTML = docbook2html
31DOC2TXT = docbook2txt
32DOC2MAN = docbook2man
33DOC2PDF = docbook2pdf
34
35TXT = fontconfig-user.txt fontconfig-devel.txt
36PDF = fontconfig-user.pdf fontconfig-devel.pdf
37HTML_FILES = fontconfig-user.html
38HTML_DIR = fontconfig-devel
39SGML = fontconfig-user.sgml fontconfig-devel.sgml
40FNCS_TMPL = ${DOC_SRC}/func.sgml
41
42DOC_FUNCS_FNCS=\
43 fcatomic.fncs \
44 fcblanks.fncs \
45 fccache.fncs \
46 fccharset.fncs \
47 fcconfig.fncs \
48 fcconstant.fncs \
49 fcdircache.fncs \
50 fcfile.fncs \
51 fcfontset.fncs \
52 fcfreetype.fncs \
53 fcinit.fncs \
54 fclangset.fncs \
55 fcmatrix.fncs \
56 fcobjectset.fncs \
57 fcobjecttype.fncs \
58 fcpattern.fncs \
59 fcstring.fncs \
60 fcstrset.fncs \
61 fcvalue.fncs
62
63DOC_FUNCS_SGML=\
64 fcatomic.sgml \
65 fcblanks.sgml \
66 fccache.sgml \
67 fccharset.sgml \
68 fcconfig.sgml \
69 fcconstant.sgml \
70 fcdircache.sgml \
71 fcfile.sgml \
72 fcfontset.sgml \
73 fcfreetype.sgml \
74 fcinit.sgml \
75 fclangset.sgml \
76 fcmatrix.sgml \
77 fcobjectset.sgml \
78 fcobjecttype.sgml \
79 fcpattern.sgml \
80 fcstring.sgml \
81 fcstrset.sgml \
82 fcvalue.sgml
83
84man5_MANS=fonts-conf.5
85man3_MANS=$(DOCMAN3)
86
87noinst_PROGRAMS=edit-sgml
88edit_sgml_SOURCES=edit-sgml.c
89
90docdir=@DOCDIR@
91
92DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
93LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/*
94
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
100
101SUFFIXES=.fncs .sgml .txt .html
102
103if USEDOCBOOK
104
105.fncs.sgml:
106 $(RM) $@
107 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
108
109.sgml.txt:
110 $(RM) $@
111 $(DOC2TXT) $<
112
113.sgml.pdf:
114 $(RM) $@
115 $(DOC2PDF) $<
116
117$(man3_MANS): func.refs
118
119func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
120 $(RM) func.refs
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
126
127local-fontconfig-devel.sgml: fontconfig-devel.sgml
128 $(LN_S) $< $@
129
130$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
131
132fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
133 $(RM) $@
134 $(DOC2MAN) local-fontconfig-user.sgml && \
135 $(RM) manpage.refs manpage.links
136
137local-fontconfig-user.sgml: fontconfig-user.sgml
138 $(LN_S) $< $@
139
140all-local: $(LOCAL_DOCS)
141
142clean-local:
143 $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
144 $(RM) -r $(HTML_DIR)
145
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
149
150fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
151 $(RM) $@
152 $(DOC2TXT) local-fontconfig-devel.sgml
153 mv local-fontconfig-devel.txt $@
154
155fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
156 $(RM) $@
157 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
158 || echo Failed to generate $@ >&2; \
159 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
160
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 $@
166 -test -f $@.tmp && $(RM) $@.tmp
167
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 $@
172
173fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
174 $(RM) $@
175 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
176 || echo Failed to generate $@ >&2; \
177 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
178
179STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
180confdir.sgml: ${DOC_SRC}/confdir.sgml.in
181 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
182
183CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
184
185htmldoc_DATA = $(HTML_DIR)/*
186
187$(HTML_DIR)/*: $(HTML_DIR)
188
189else
190
191htmldoc_DATA = $(srcdir)/$(HTML_DIR)/*
192
193all-local:
194clean-local:
195endif
196
197htmldocdir=$(docdir)/$(HTML_DIR)
198
199doc_DATA = $(DOC_FILES)
200