]> git.wh0rd.org - fontconfig.git/blame_incremental - doc/Makefile.am
Link new function documentation into the fontconfig-devel.sgml
[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) local-fontconfig-devel.sgml && \
122 mv manpage.refs func.refs
123 $(RM) manpage.links
124
125local-fontconfig-devel.sgml: fontconfig-devel.sgml
126 $(LN_S) $< $@
127
128$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
129
130fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
131 $(RM) $@
132 $(DOC2MAN) local-fontconfig-user.sgml && \
133 $(RM) manpage.refs manpage.links
134
135local-fontconfig-user.sgml: fontconfig-user.sgml
136 $(LN_S) $< $@
137
138all-local: $(LOCAL_DOCS)
139
140clean-local:
141 $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
142 $(RM) -r $(HTML_DIR)
143
144$(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
145 $(RM) -r $(HTML_DIR)
146 $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml
147
148fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
149 $(RM) $@
150 $(DOC2TXT) local-fontconfig-devel.sgml
151 mv local-fontconfig-devel.txt $@
152
153fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
154 $(RM) $@
155 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
156 || echo Failed to generate $@ >&2; \
157 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
158
159fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
160 $(RM) $@ local-$@ $@.tmp
161 $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
162 -test -f local-$@ && mv local-$@ $@
163 -test -f $@ || mv $@.tmp $@
164 -test -f $@.tmp && $(RM) $@.tmp
165
166fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
167 $(RM) $@
168 $(DOC2TXT) local-fontconfig-user.sgml
169 mv local-fontconfig-user.txt $@
170
171fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
172 $(RM) $@
173 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
174 || echo Failed to generate $@ >&2; \
175 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
176
177STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
178confdir.sgml: ${DOC_SRC}/confdir.sgml.in
179 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
180
181CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
182
183htmldoc_DATA = $(HTML_DIR)/*
184
185$(HTML_DIR)/*: $(HTML_DIR)
186
187else
188
189htmldoc_DATA = $(srcdir)/$(HTML_DIR)/*
190
191all-local:
192clean-local:
193endif
194
195htmldocdir=$(docdir)/$(HTML_DIR)
196
197doc_DATA = $(DOC_FILES)
198