1 # -*- encoding: utf-8 -*-
3 # fontconfig/doc/Makefile.am
5 # Copyright © 2003 Keith Packard
7 # Permission to use, copy, modify, distribute, and sell this software and its
8 # documentation for any purpose is hereby granted without fee, provided that
9 # the above copyright notice appear in all copies and that both that
10 # copyright notice and this permission notice appear in supporting
11 # documentation, and that the name of the author(s) not be used in
12 # advertising or publicity pertaining to distribution of the software without
13 # specific, written prior permission. The authors make no
14 # representations about the suitability of this software for any purpose. It
15 # is provided "as is" without express or implied warranty.
17 # THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
18 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
19 # EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
20 # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21 # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23 # PERFORMANCE OF THIS SOFTWARE.
36 MAINTAINERCLEANFILES = \
56 TESTS_ENVIRONMENT=top_srcdir=${top_srcdir} sh
58 DOC2HTML = docbook2html
86 $(srcdir)/fontconfig-user.sgml \
87 $(srcdir)/fontconfig-devel.sgml \
90 local-fontconfig-user.sgml \
91 local-fontconfig-devel.sgml \
94 DOC_FUNCS_SGML = $(DOC_FUNCS_FNCS:.fncs=.sgml)
108 TXT_FILES = $(SGML_FILES:.sgml=.txt)
109 PDF_FILES = $(SGML_FILES:.sgml=.pdf)
111 fontconfig-user.html \
113 HTML_DIR = fontconfig-devel
118 edit_sgml_SOURCES = \
139 htmldocdir = $(docdir)/$(HTML_DIR)
145 $(LOCAL_SGML_FILES) \
150 htmldoc_DATA += $(HTML_DIR)/*
155 @echo Warning: cannot rebuild $@ when cross-compiling
157 .fncs.sgml: edit-sgml$(EXEEXT) $(srcdir)/func.sgml
159 $(AM_V_GEN) $(builddir)/edit-sgml$(EXEEXT) $(srcdir)/func.sgml < '$*.fncs' > $*.sgml
161 .sgml.txt: $(DOCS_DEPS)
163 $(AM_V_GEN) $(DOC2TXT) $*.sgml
164 .sgml.pdf: $(DOCS_DEPS)
166 $(AM_V_GEN) $(DOC2PDF) $*.sgml
167 .sgml.html: $(DOCS_DEPS)
169 $(AM_V_GEN) $(DOC2HTML) -u $*.sgml > $@
171 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
173 $(AM_V_GEN) $(DOC2MAN) local-fontconfig-user.sgml && \
176 $(man3_MANS): func.refs
177 func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS)
179 [ "x$(builddir)" != "x$(srcdir)" ] && \
180 for f in $(DOC_FUNCS_SGML); do \
181 rm -f $(builddir)/$$f || :; \
182 $(LN_S) $(srcdir)/$$f $(builddir)/$$f; \
184 $(AM_V_GEN) $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
185 mv devel-man/manpage.refs func.refs && \
186 mv devel-man/*.3 . && \
187 rm devel-man/manpage.* && \
189 confdir.sgml: $(srcdir)/confdir.sgml.in
190 $(AM_V_GEN) sed -e 's,@CONFDIR\@,${CONFDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@
192 $(HTML_DIR)/*: $(HTML_DIR)
193 $(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
195 $(AM_V_GEN) $(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml
196 local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml
197 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@
198 local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
199 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@
201 all-local: $(BUILT_DOCS) $(HTML_DIR)/*
203 -rm -r $(HTML_DIR) devel-man
205 htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*