2 # fontconfig/doc/Makefile.am
4 # Copyright © 2003 Keith Packard
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.
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.
25 EXEEXT = @EXEEXT_FOR_BUILD@
26 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
29 DOC_MODULE = fontconfig
30 DOC2HTML = docbook2html
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
84 man5_MANS=fonts-conf.5
87 noinst_PROGRAMS=edit-sgml
88 edit_sgml_SOURCES=edit-sgml.c
92 DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
93 LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/*
95 check_SCRIPTS=check-missing-doc
96 TESTS_ENVIRONMENT=top_srcdir=${top_srcdir} sh
97 TESTS=check-missing-doc
99 EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(check_SCRIPTS) func.sgml confdir.sgml.in
101 SUFFIXES=.fncs .sgml .txt .html
107 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
117 $(man3_MANS): func.refs
119 func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
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 rm -f devel-man/manpage.log
128 local-fontconfig-devel.sgml: fontconfig-devel.sgml
131 $(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
133 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
135 $(DOC2MAN) local-fontconfig-user.sgml && \
136 $(RM) manpage.refs manpage.links
138 local-fontconfig-user.sgml: fontconfig-user.sgml
141 all-local: $(LOCAL_DOCS)
144 $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
147 $(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
149 $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml
151 fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
153 $(DOC2TXT) local-fontconfig-devel.sgml
154 mv local-fontconfig-devel.txt $@
156 fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
158 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
159 || echo Failed to generate $@ >&2; \
160 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
162 fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
163 $(RM) $@ local-$@ $@.tmp
164 $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
165 -test -f local-$@ && mv local-$@ $@
166 -test -f $@ || mv $@.tmp $@
167 -test -f $@.tmp && $(RM) $@.tmp
169 fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
171 $(DOC2TXT) local-fontconfig-user.sgml
172 mv local-fontconfig-user.txt $@
174 fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
176 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
177 || echo Failed to generate $@ >&2; \
178 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
180 STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
181 confdir.sgml: ${DOC_SRC}/confdir.sgml.in
182 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
184 CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
186 htmldoc_DATA = $(HTML_DIR)/*
188 $(HTML_DIR)/*: $(HTML_DIR)
192 htmldoc_DATA = $(srcdir)/$(HTML_DIR)/*
198 htmldocdir=$(docdir)/$(HTML_DIR)
200 doc_DATA = $(DOC_FILES)