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 fontconfig-user.sgml \
87 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
158 $(AM_V_GEN) $(RM) $@; \
159 $(builddir)/edit-sgml$(EXEEXT) $(srcdir)/func.sgml < '$(srcdir)/$*.fncs' > $*.sgml
162 $(AM_V_GEN) $(RM) $@; \
165 $(AM_V_GEN) $(RM) $@; \
168 $(AM_V_GEN) $(RM) $@; \
169 $(DOC2HTML) -u $*.sgml > $@
171 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
172 $(AM_V_GEN) $(RM) $@; \
173 $(DOC2MAN) local-fontconfig-user.sgml && \
176 $(man3_MANS): func.refs
177 func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS)
178 $(AM_V_GEN) $(RM) $@; \
179 $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
180 mv devel-man/manpage.refs func.refs && \
181 mv devel-man/*.3 . && \
182 $(RM) devel-man/manpage.* && \
183 rmdir devel-man || rm $@ || :
184 confdir.sgml: $(srcdir)/confdir.sgml.in
185 $(AM_V_GEN) sed -e 's,@CONFDIR\@,${CONFDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@
187 $(DOC_FUNCS_SGML): $(DOC_FUNCS_FNCS) edit-sgml$(EXEEXT) $(srcdir)/func.sgml
188 $(TXT_FILES): $(DOCS_DEPS)
189 $(PDF_FILES): $(DOCS_DEPS)
190 $(HTML_FILES): $(DOCS_DEPS)
191 $(HTML_DIR)/*: $(HTML_DIR)
192 $(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
193 $(AM_V_GEN) $(RM) -r $@; \
194 $(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml
195 local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml
196 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@; \
197 [ ! -f $(builddir)/fontconfig-user.sgml ] && cp -a $(srcdir)/fontconfig-user.sgml $(builddir)/fontconfig-user.sgml || :
198 local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
199 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@; \
200 [ ! -f $(builddir)/fontconfig-devel.sgml ] && cp -a $(srcdir)/fontconfig-devel.sgml $(builddir)/fontconfig-devel.sgml || :
202 all-local: $(BUILT_DOCS) $(HTML_DIR)/*
204 $(RM) -r $(HTML_DIR) devel-man
205 [ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || :
207 htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*
212 -include $(top_srcdir)/git.mk