fontconfig/doc/Makefile.am

221 lines
5.4 KiB
Makefile
Raw Normal View History

2012-03-09 09:33:03 +01:00
# -*- encoding: utf-8 -*-
#
2008-08-13 09:30:23 +02:00
# fontconfig/doc/Makefile.am
#
# Copyright © 2003 Keith Packard
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of the author(s) not be used in
# advertising or publicity pertaining to distribution of the software without
# specific, written prior permission. The authors make no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
2012-03-09 09:33:03 +01:00
NULL =
EXTRA_DIST = \
$(BUILT_DOCS) \
$(DOC_FUNCS_FNCS) \
$(DOC_FUNCS_SGML) \
$(HTML_DIR)/* \
$(SGML_FILES) \
$(check_SCRIPTS) \
confdir.sgml.in \
func.sgml \
$(NULL)
MAINTAINERCLEANFILES = \
$(DOC_FUNCS_SGML) \
$(NULL)
CLEANFILES = \
$(BUILT_DOCS) \
$(LOCAL_SGML_FILES) \
confdir.sgml \
func.refs \
$(NULL)
BUILT_SOURCES = \
$(NULL)
SUFFIXES = \
.fncs \
.sgml \
.txt \
.html \
$(NULL)
TESTS = \
check-missing-doc \
$(NULL)
TESTS_ENVIRONMENT = \
top_srcdir=${top_srcdir}; export top_srcdir; \
$(NULL)
LOG_COMPILER = sh
2012-03-09 09:33:03 +01:00
#
2003-03-07 20:37:16 +01:00
DOC2HTML = docbook2html
2012-03-09 09:33:03 +01:00
DOC2TXT = docbook2txt
DOC2MAN = docbook2man
DOC2PDF = docbook2pdf
DOC_FUNCS_FNCS = \
fcatomic.fncs \
fcblanks.fncs \
fccache.fncs \
fccharset.fncs \
fcconfig.fncs \
fcconstant.fncs \
fcdircache.fncs \
fcfile.fncs \
fcfontset.fncs \
fcformat.fncs \
fcfreetype.fncs \
fcinit.fncs \
fclangset.fncs \
fcmatrix.fncs \
fcobjectset.fncs \
fcobjecttype.fncs \
fcpattern.fncs \
2014-03-26 08:01:49 +01:00
fcrange.fncs \
2012-03-09 09:33:03 +01:00
fcstring.fncs \
fcstrset.fncs \
fcvalue.fncs \
$(NULL)
2012-06-11 11:39:37 +02:00
SGML_FILES = \
fontconfig-user.sgml \
fontconfig-devel.sgml \
2012-03-09 09:33:03 +01:00
$(NULL)
LOCAL_SGML_FILES = \
local-fontconfig-user.sgml \
local-fontconfig-devel.sgml \
$(NULL)
DOC_FUNCS_SGML = $(DOC_FUNCS_FNCS:.fncs=.sgml)
BUILT_DOCS = \
$(HTML_FILES) \
$(PDF_FILES) \
$(TXT_FILES) \
$(man3_MANS) \
$(man5_MANS) \
$(NULL)
DOCS_DEPS = \
$(DOC_FUNCS_SGML) \
confdir.sgml \
version.sgml \
$(NULL)
TXT_FILES = $(SGML_FILES:.sgml=.txt)
PDF_FILES = $(SGML_FILES:.sgml=.pdf)
HTML_FILES = \
fontconfig-user.html \
$(NULL)
HTML_DIR = fontconfig-devel
2012-03-09 09:33:03 +01:00
#
noinst_PROGRAMS = \
$(NULL)
##
edit_sgml_SOURCES = \
edit-sgml.c \
$(NULL)
edit_sgml_CC = $(CC_FOR_BUILD)
2012-03-09 09:33:03 +01:00
#
check_SCRIPTS = \
check-missing-doc \
$(NULL)
#
man3_MANS = \
$(DOCMAN3) \
$(NULL)
man5_MANS = \
fonts-conf.5 \
$(NULL)
#
doc_DATA = \
$(TXT_FILES) \
$(PDF_FILES) \
$(HTML_FILES) \
$(NULL)
#
htmldocdir = $(docdir)/$(HTML_DIR)
htmldoc_DATA = \
$(NULL)
if USEDOCBOOK
2012-03-09 09:33:03 +01:00
BUILT_SOURCES += \
$(LOCAL_SGML_FILES) \
$(NULL)
noinst_PROGRAMS += \
edit-sgml \
$(NULL)
htmldoc_DATA += $(HTML_DIR)/*
##
.fncs.sgml:
$(AM_V_GEN) $(RM) $@; \
2012-06-11 11:39:37 +02:00
$(builddir)/edit-sgml$(EXEEXT) $(srcdir)/func.sgml < '$(srcdir)/$*.fncs' > $*.sgml
.sgml.txt:
$(AM_V_GEN) $(RM) $@; \
$(DOC2TXT) $*.sgml
.sgml.pdf:
$(AM_V_GEN) $(RM) $@; \
$(DOC2PDF) $*.sgml
.sgml.html:
$(AM_V_GEN) $(RM) $@; \
$(DOC2HTML) -u $*.sgml > $@
2012-03-09 09:33:03 +01:00
##
fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
$(AM_V_GEN) $(RM) $@; \
$(DOC2MAN) local-fontconfig-user.sgml && \
$(RM) manpage.*
2012-03-09 09:33:03 +01:00
##
$(man3_MANS): func.refs
func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS)
$(AM_V_GEN) $(RM) $@; \
$(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
2012-03-09 09:33:03 +01:00
mv devel-man/manpage.refs func.refs && \
mv devel-man/*.3 . && \
$(RM) devel-man/manpage.* && \
2012-11-30 12:10:30 +01:00
rmdir devel-man || rm $@ || :
2012-03-09 09:33:03 +01:00
confdir.sgml: $(srcdir)/confdir.sgml.in
2012-03-10 18:12:10 +01:00
$(AM_V_GEN) sed -e 's,@CONFDIR\@,${CONFDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@
2012-03-09 09:33:03 +01:00
##
$(DOC_FUNCS_SGML): $(DOC_FUNCS_FNCS) edit-sgml$(EXEEXT) $(srcdir)/func.sgml
$(TXT_FILES): $(DOCS_DEPS)
$(PDF_FILES): $(DOCS_DEPS)
$(HTML_FILES): $(DOCS_DEPS)
$(HTML_DIR)/*: $(HTML_DIR)
2012-03-09 09:33:03 +01:00
$(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
$(AM_V_GEN) $(RM) -r $@; \
$(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml
2012-03-09 09:33:03 +01:00
local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml
2012-06-11 11:39:37 +02:00
$(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@; \
2012-06-12 04:02:03 +02:00
[ ! -f $(builddir)/fontconfig-user.sgml ] && cp -a $(srcdir)/fontconfig-user.sgml $(builddir)/fontconfig-user.sgml || :
2012-03-09 09:33:03 +01:00
local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
2012-06-11 11:39:37 +02:00
$(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@; \
2012-06-12 04:02:03 +02:00
[ ! -f $(builddir)/fontconfig-devel.sgml ] && cp -a $(srcdir)/fontconfig-devel.sgml $(builddir)/fontconfig-devel.sgml || :
2012-03-09 09:33:03 +01:00
#
all-local: $(BUILT_DOCS) $(HTML_DIR)/*
clean-local:
$(RM) -r $(HTML_DIR) devel-man
2012-11-30 12:10:30 +01:00
[ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || :
dist-local-check-docs-enabled:
@true
else
2012-03-09 09:33:03 +01:00
htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*
all-local:
clean-local:
dist-local-check-docs-enabled:
@echo "*** --enable-man must be used in order to make dist"
@false
endif
2012-10-06 23:52:39 +02:00
# force doc rebulid after configure
dist-hook-local: dist-local-check-docs-enabled
2012-10-06 23:52:39 +02:00
-include $(top_srcdir)/git.mk