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 = \
57 top_srcdir=${top_srcdir}; export top_srcdir; \
61 DOC2HTML = docbook2html
91 fontconfig-user.sgml \
92 fontconfig-devel.sgml \
95 local-fontconfig-user.sgml \
96 local-fontconfig-devel.sgml \
99 DOC_FUNCS_SGML = $(DOC_FUNCS_FNCS:.fncs=.sgml)
113 TXT_FILES = $(SGML_FILES:.sgml=.txt)
114 PDF_FILES = $(SGML_FILES:.sgml=.pdf)
116 fontconfig-user.html \
118 HTML_DIR = fontconfig-devel
123 edit_sgml_SOURCES = \
126 edit_sgml_CC = $(CC_FOR_BUILD)
145 htmldocdir = $(docdir)/$(HTML_DIR)
151 $(LOCAL_SGML_FILES) \
156 htmldoc_DATA += $(HTML_DIR)/*
160 $(AM_V_GEN) $(RM) $@; \
161 $(builddir)/edit-sgml$(EXEEXT) $(srcdir)/func.sgml < '$(srcdir)/$*.fncs' > $*.sgml
163 $(AM_V_GEN) $(RM) $@; \
166 $(AM_V_GEN) $(RM) $@; \
169 $(AM_V_GEN) $(RM) $@; \
170 $(DOC2HTML) -u $*.sgml > $@
172 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
173 $(AM_V_GEN) $(RM) $@; \
174 $(DOC2MAN) local-fontconfig-user.sgml && \
177 $(man3_MANS): func.refs
178 func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS)
179 $(AM_V_GEN) $(RM) $@; \
180 $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
181 mv devel-man/manpage.refs func.refs && \
182 mv devel-man/*.3 . && \
183 $(RM) devel-man/manpage.* && \
184 rmdir devel-man || rm $@ || :
185 confdir.sgml: $(srcdir)/confdir.sgml.in
186 $(AM_V_GEN) sed -e 's,@CONFDIR\@,${CONFDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@
188 $(DOC_FUNCS_SGML): $(DOC_FUNCS_FNCS) edit-sgml$(EXEEXT) $(srcdir)/func.sgml
189 $(TXT_FILES): $(DOCS_DEPS)
190 $(PDF_FILES): $(DOCS_DEPS)
191 $(HTML_FILES): $(DOCS_DEPS)
192 $(HTML_DIR)/*: $(HTML_DIR)
193 $(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
194 $(AM_V_GEN) $(RM) -r $@; \
195 $(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 [ ! -f $(builddir)/fontconfig-user.sgml ] && cp -a $(srcdir)/fontconfig-user.sgml $(builddir)/fontconfig-user.sgml || :
199 local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
200 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@; \
201 [ ! -f $(builddir)/fontconfig-devel.sgml ] && cp -a $(srcdir)/fontconfig-devel.sgml $(builddir)/fontconfig-devel.sgml || :
203 all-local: $(BUILT_DOCS) $(HTML_DIR)/*
205 $(RM) -r $(HTML_DIR) devel-man
206 [ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || :
207 dist-local-check-docs-enabled:
210 htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*
213 dist-local-check-docs-enabled:
214 @echo "*** --enable-man must be used in order to make dist"
218 # force doc rebulid after configure
219 dist-hook-local: dist-local-check-docs-enabled
221 -include $(top_srcdir)/git.mk