]> git.wh0rd.org - fontconfig.git/blame_incremental - doc/Makefile.am
Fix formatting syntax in doc/fccache.fncs
[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 fccharset.sgml \
67 fcconfig.sgml \
68 fcconstant.sgml \
69 fcfile.sgml \
70 fcfontset.sgml \
71 fcfreetype.sgml \
72 fcinit.sgml \
73 fcmatrix.sgml \
74 fcobjectset.sgml \
75 fcobjecttype.sgml \
76 fcpattern.sgml \
77 fcstring.sgml \
78 fcstrset.sgml \
79 fcvalue.sgml
80
81man5_MANS=fonts-conf.5
82man3_MANS=$(DOCMAN3)
83
84noinst_PROGRAMS=edit-sgml
85edit_sgml_SOURCES=edit-sgml.c
86
87docdir=@DOCDIR@
88
89DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
90LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/*
91
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
97
98SUFFIXES=.fncs .sgml .txt .html
99
100if USEDOCBOOK
101
102.fncs.sgml:
103 $(RM) $@
104 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
105
106.sgml.txt:
107 $(RM) $@
108 $(DOC2TXT) $<
109
110.sgml.pdf:
111 $(RM) $@
112 $(DOC2PDF) $<
113
114$(man3_MANS): func.refs
115
116func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
117 $(RM) func.refs
118 $(DOC2MAN) local-fontconfig-devel.sgml && \
119 mv manpage.refs func.refs
120 $(RM) manpage.links
121
122local-fontconfig-devel.sgml: fontconfig-devel.sgml
123 $(LN_S) $< $@
124
125$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
126
127fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
128 $(RM) $@
129 $(DOC2MAN) local-fontconfig-user.sgml && \
130 $(RM) manpage.refs manpage.links
131
132local-fontconfig-user.sgml: fontconfig-user.sgml
133 $(LN_S) $< $@
134
135all-local: $(LOCAL_DOCS)
136
137clean-local:
138 $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
139 $(RM) -r $(HTML_DIR)
140
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
144
145fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
146 $(RM) $@
147 $(DOC2TXT) local-fontconfig-devel.sgml
148 mv local-fontconfig-devel.txt $@
149
150fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
151 $(RM) $@
152 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
153 || echo Failed to generate $@ >&2; \
154 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
155
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 $@
161 -test -f $@.tmp && $(RM) $@.tmp
162
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 $@
167
168fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
169 $(RM) $@
170 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
171 || echo Failed to generate $@ >&2; \
172 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
173
174STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
175confdir.sgml: ${DOC_SRC}/confdir.sgml.in
176 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
177
178CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
179
180htmldoc_DATA = $(HTML_DIR)/*
181
182$(HTML_DIR)/*: $(HTML_DIR)
183
184else
185
186htmldoc_DATA = $(srcdir)/$(HTML_DIR)/*
187
188all-local:
189clean-local:
190endif
191
192htmldocdir=$(docdir)/$(HTML_DIR)
193
194doc_DATA = $(DOC_FILES)
195