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_OBJECTS) : CC:=$(CC_FOR_BUILD)
127 $(edit_sgml_OBJECTS) : CFLAGS:=$(CFLAGS_FOR_BUILD)
128 $(edit_sgml_OBJECTS) : CPPFLAGS:=$(CPPFLAGS_FOR_BUILD)
129 edit_sgml_LINK = $(CC_FOR_BUILD) -o $@
148 htmldocdir = $(docdir)/$(HTML_DIR)
154 $(LOCAL_SGML_FILES) \
159 htmldoc_DATA += $(HTML_DIR)/*
163 $(AM_V_GEN) $(RM) $@; \
164 $(builddir)/edit-sgml$(EXEEXT) $(srcdir)/func.sgml < '$(srcdir)/$*.fncs' > $*.sgml
166 $(AM_V_GEN) $(RM) $@; \
169 $(AM_V_GEN) $(RM) $@; \
172 $(AM_V_GEN) $(RM) $@; \
173 $(DOC2HTML) -u $*.sgml > $@
175 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
176 $(AM_V_GEN) $(RM) $@; \
177 $(DOC2MAN) local-fontconfig-user.sgml && \
180 $(man3_MANS): func.refs
181 func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS)
182 $(AM_V_GEN) $(RM) $@; \
183 $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
184 mv devel-man/manpage.refs func.refs && \
185 mv devel-man/*.3 . && \
186 $(RM) devel-man/manpage.* && \
187 rmdir devel-man || rm $@ || :
188 confdir.sgml: $(srcdir)/confdir.sgml.in
189 $(AM_V_GEN) sed -e 's,@CONFDIR\@,${CONFDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@
191 $(DOC_FUNCS_SGML): $(DOC_FUNCS_FNCS) edit-sgml$(EXEEXT) $(srcdir)/func.sgml
192 $(TXT_FILES): $(DOCS_DEPS)
193 $(PDF_FILES): $(DOCS_DEPS)
194 $(HTML_FILES): $(DOCS_DEPS)
195 $(HTML_DIR)/*: $(HTML_DIR)
196 $(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
197 $(AM_V_GEN) $(RM) -r $@; \
198 $(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml
199 local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml
200 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@; \
201 [ ! -f $(builddir)/fontconfig-user.sgml ] && cp -a $(srcdir)/fontconfig-user.sgml $(builddir)/fontconfig-user.sgml || :
202 local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
203 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@; \
204 [ ! -f $(builddir)/fontconfig-devel.sgml ] && cp -a $(srcdir)/fontconfig-devel.sgml $(builddir)/fontconfig-devel.sgml || :
206 all-local: $(BUILT_DOCS) $(HTML_DIR)/*
208 $(RM) -r $(HTML_DIR) devel-man
209 [ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || :
210 dist-local-check-docs-enabled:
213 htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*
216 dist-local-check-docs-enabled:
217 @echo "*** --enable-man must be used in order to make dist"
221 # force doc rebulid after configure
222 dist-hook-local: dist-local-check-docs-enabled
224 -include $(top_srcdir)/git.mk