]> git.wh0rd.org - fontconfig.git/blob - doc/Makefile.am
Document FcPatternFormat() format
[fontconfig.git] / doc / Makefile.am
1 #
2 # fontconfig/doc/Makefile.am
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 # THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 # EVENT SHALL THE AUTHOR(S) 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
24 CC = @CC_FOR_BUILD@
25 EXEEXT = @EXEEXT_FOR_BUILD@
26 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
27
28 DOC_SRC = $(srcdir)
29 DOC_MODULE = fontconfig
30 DOC2HTML = docbook2html
31 DOC2TXT = docbook2txt
32 DOC2MAN = docbook2man
33 DOC2PDF = docbook2pdf
34
35 TXT = fontconfig-user.txt fontconfig-devel.txt
36 PDF = fontconfig-user.pdf fontconfig-devel.pdf
37 HTML_FILES = fontconfig-user.html
38 HTML_DIR = fontconfig-devel
39 SGML = fontconfig-user.sgml fontconfig-devel.sgml
40 FNCS_TMPL = ${DOC_SRC}/func.sgml
41
42 DOC_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 fcformat.fncs \
53 fcfreetype.fncs \
54 fcinit.fncs \
55 fclangset.fncs \
56 fcmatrix.fncs \
57 fcobjectset.fncs \
58 fcobjecttype.fncs \
59 fcpattern.fncs \
60 fcstring.fncs \
61 fcstrset.fncs \
62 fcvalue.fncs
63
64 DOC_FUNCS_SGML=\
65 fcatomic.sgml \
66 fcblanks.sgml \
67 fccache.sgml \
68 fccharset.sgml \
69 fcconfig.sgml \
70 fcconstant.sgml \
71 fcdircache.sgml \
72 fcfile.sgml \
73 fcfontset.sgml \
74 fcformat.sgml \
75 fcfreetype.sgml \
76 fcinit.sgml \
77 fclangset.sgml \
78 fcmatrix.sgml \
79 fcobjectset.sgml \
80 fcobjecttype.sgml \
81 fcpattern.sgml \
82 fcstring.sgml \
83 fcstrset.sgml \
84 fcvalue.sgml
85
86 man5_MANS=fonts-conf.5
87 man3_MANS=$(DOCMAN3)
88
89 noinst_PROGRAMS=edit-sgml
90 edit_sgml_SOURCES=edit-sgml.c
91
92 docdir=@DOCDIR@
93
94 DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
95 LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/*
96
97 check_SCRIPTS=check-missing-doc
98 TESTS_ENVIRONMENT=top_srcdir=${top_srcdir} sh
99 TESTS=check-missing-doc
100
101 EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(check_SCRIPTS) func.sgml confdir.sgml.in
102
103 SUFFIXES=.fncs .sgml .txt .html
104
105 if USEDOCBOOK
106
107 .fncs.sgml:
108 $(RM) $@
109 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
110
111 .sgml.txt:
112 $(RM) $@
113 $(DOC2TXT) $<
114
115 .sgml.pdf:
116 $(RM) $@
117 $(DOC2PDF) $<
118
119 $(man3_MANS): func.refs
120
121 func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
122 $(RM) func.refs
123 $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
124 mv devel-man/manpage.refs func.refs && \
125 mv devel-man/*.3 . && \
126 $(RM) devel-man/manpage.* && \
127 rmdir devel-man
128
129 local-fontconfig-devel.sgml: fontconfig-devel.sgml
130 $(LN_S) $< $@
131
132 $(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
133
134 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
135 $(RM) $@
136 $(DOC2MAN) local-fontconfig-user.sgml && \
137 $(RM) manpage.*
138
139 local-fontconfig-user.sgml: fontconfig-user.sgml
140 $(LN_S) $< $@
141
142 all-local: $(LOCAL_DOCS)
143
144 clean-local:
145 $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
146 $(RM) -r $(HTML_DIR)
147
148 $(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
149 $(RM) -r $(HTML_DIR)
150 $(DOC2HTML) -V '%use-id-as-filename%' -o $(HTML_DIR) local-fontconfig-devel.sgml
151
152 fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
153 $(RM) $@
154 $(DOC2TXT) local-fontconfig-devel.sgml
155 mv local-fontconfig-devel.txt $@
156
157 fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
158 $(RM) $@
159 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
160 || echo Failed to generate $@ >&2; \
161 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
162
163 fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
164 $(RM) $@ local-$@ $@.tmp
165 $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
166 -test -f local-$@ && mv local-$@ $@
167 -test -f $@ || mv $@.tmp $@
168 -test -f $@.tmp && $(RM) $@.tmp
169
170 fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
171 $(RM) $@
172 $(DOC2TXT) local-fontconfig-user.sgml
173 mv local-fontconfig-user.txt $@
174
175 fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
176 $(RM) $@
177 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
178 || echo Failed to generate $@ >&2; \
179 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
180
181 STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
182 confdir.sgml: ${DOC_SRC}/confdir.sgml.in
183 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
184
185 CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
186
187 htmldoc_DATA = $(HTML_DIR)/*
188
189 $(HTML_DIR)/*: $(HTML_DIR)
190
191 else
192
193 htmldoc_DATA = $(srcdir)/$(HTML_DIR)/*
194
195 all-local:
196 clean-local:
197 endif
198
199 htmldocdir=$(docdir)/$(HTML_DIR)
200
201 doc_DATA = $(DOC_FILES)
202