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.
40 maintainerdoccleanfiles = \
46 maintainerdoccleanfiles = \
52 MAINTAINERCLEANFILES = \
54 $(maintainerdoccleanfiles) \
72 top_srcdir=${top_srcdir}; export top_srcdir; \
76 DOC2HTML = docbook2html
106 fontconfig-user.sgml \
107 fontconfig-devel.sgml \
110 local-fontconfig-user.sgml \
111 local-fontconfig-devel.sgml \
114 DOC_FUNCS_SGML = $(DOC_FUNCS_FNCS:.fncs=.sgml)
128 TXT_FILES = $(SGML_FILES:.sgml=.txt)
129 PDF_FILES = $(SGML_FILES:.sgml=.pdf)
131 fontconfig-user.html \
133 HTML_DIR = fontconfig-devel
158 htmldocdir = $(docdir)/$(HTML_DIR)
164 $(LOCAL_SGML_FILES) \
166 htmldoc_DATA += $(HTML_DIR)/*
170 $(AM_V_GEN) $(RM) $@; \
171 $(PYTHON) $(srcdir)/edit-sgml.py $(srcdir)/func.sgml '$(srcdir)/$*.fncs' $*.sgml
173 $(AM_V_GEN) $(RM) $@; \
176 $(AM_V_GEN) $(RM) $@; \
179 $(AM_V_GEN) $(RM) $@; \
180 $(DOC2HTML) -u $*.sgml > $@
182 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
183 $(AM_V_GEN) $(RM) $@; \
184 $(DOC2MAN) local-fontconfig-user.sgml && \
187 $(man3_MANS): func.refs
188 func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS)
189 $(AM_V_GEN) $(RM) $@; \
190 $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
191 mv devel-man/manpage.refs func.refs && \
192 mv devel-man/*.3 . && \
193 $(RM) devel-man/manpage.* && \
194 rmdir devel-man || rm $@ || :
195 confdir.sgml: $(srcdir)/confdir.sgml.in
196 $(AM_V_GEN) sed -e 's,@BASECONFIGDIR\@,${BASECONFIGDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@
198 $(DOC_FUNCS_SGML): $(DOC_FUNCS_FNCS) $(srcdir)/edit-sgml.py $(srcdir)/func.sgml
199 $(TXT_FILES): $(DOCS_DEPS)
200 $(PDF_FILES): $(DOCS_DEPS)
201 $(HTML_FILES): $(DOCS_DEPS)
202 $(HTML_DIR)/*: $(HTML_DIR)
203 $(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
204 $(AM_V_GEN) $(RM) -r $@; \
205 $(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml
206 local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml
207 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@; \
208 [ ! -f $(builddir)/fontconfig-user.sgml ] && cp -a $(srcdir)/fontconfig-user.sgml $(builddir)/fontconfig-user.sgml || :
209 local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
210 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@; \
211 [ ! -f $(builddir)/fontconfig-devel.sgml ] && cp -a $(srcdir)/fontconfig-devel.sgml $(builddir)/fontconfig-devel.sgml || :
213 all-local: $(BUILT_DOCS) $(HTML_DIR)/*
215 $(RM) -r $(HTML_DIR) devel-man
216 [ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || :
217 dist-local-check-docs-enabled:
220 htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*
222 $(AM_V_GEN) $(RM) $@; \
226 dist-local-check-docs-enabled:
227 @echo "*** --enable-man must be used in order to make dist"
231 # force doc rebuild after configure
232 dist-hook-local: dist-local-check-docs-enabled
234 -include $(top_srcdir)/git.mk