Makefile.am revision c9710b42
1# -*- encoding: utf-8 -*- 2# 3# fontconfig/doc/Makefile.am 4# 5# Copyright © 2003 Keith Packard 6# 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. 16# 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. 24 25NULL = 26EXTRA_DIST = \ 27 $(BUILT_DOCS) \ 28 $(DOC_FUNCS_FNCS) \ 29 $(DOC_FUNCS_SGML) \ 30 $(HTML_DIR)/* \ 31 $(SGML_FILES) \ 32 $(check_SCRIPTS) \ 33 confdir.sgml.in \ 34 func.sgml \ 35 $(NULL) 36MAINTAINERCLEANFILES = \ 37 $(DOC_FUNCS_SGML) \ 38 $(NULL) 39CLEANFILES = \ 40 $(BUILT_DOCS) \ 41 $(LOCAL_SGML_FILES) \ 42 confdir.sgml \ 43 func.refs \ 44 $(NULL) 45BUILT_SOURCES = \ 46 $(NULL) 47SUFFIXES = \ 48 .fncs \ 49 .sgml \ 50 .txt \ 51 .html \ 52 $(NULL) 53TESTS = \ 54 check-missing-doc \ 55 $(NULL) 56TESTS_ENVIRONMENT = \ 57 top_srcdir=${top_srcdir}; export top_srcdir; \ 58 $(NULL) 59LOG_COMPILER = sh 60# 61DOC2HTML = docbook2html 62DOC2TXT = docbook2txt 63DOC2MAN = docbook2man 64DOC2PDF = docbook2pdf 65 66DOC_FUNCS_FNCS = \ 67 fcatomic.fncs \ 68 fcblanks.fncs \ 69 fccache.fncs \ 70 fccharset.fncs \ 71 fcconfig.fncs \ 72 fcconstant.fncs \ 73 fcdircache.fncs \ 74 fcfile.fncs \ 75 fcfontset.fncs \ 76 fcformat.fncs \ 77 fcfreetype.fncs \ 78 fcinit.fncs \ 79 fclangset.fncs \ 80 fcmatrix.fncs \ 81 fcobjectset.fncs \ 82 fcobjecttype.fncs \ 83 fcpattern.fncs \ 84 fcstring.fncs \ 85 fcstrset.fncs \ 86 fcvalue.fncs \ 87 $(NULL) 88SGML_FILES = \ 89 fontconfig-user.sgml \ 90 fontconfig-devel.sgml \ 91 $(NULL) 92LOCAL_SGML_FILES = \ 93 local-fontconfig-user.sgml \ 94 local-fontconfig-devel.sgml \ 95 $(NULL) 96 97DOC_FUNCS_SGML = $(DOC_FUNCS_FNCS:.fncs=.sgml) 98BUILT_DOCS = \ 99 $(HTML_FILES) \ 100 $(PDF_FILES) \ 101 $(TXT_FILES) \ 102 $(man3_MANS) \ 103 $(man5_MANS) \ 104 $(NULL) 105DOCS_DEPS = \ 106 $(DOC_FUNCS_SGML) \ 107 confdir.sgml \ 108 version.sgml \ 109 $(NULL) 110 111TXT_FILES = $(SGML_FILES:.sgml=.txt) 112PDF_FILES = $(SGML_FILES:.sgml=.pdf) 113HTML_FILES = \ 114 fontconfig-user.html \ 115 $(NULL) 116HTML_DIR = fontconfig-devel 117# 118noinst_PROGRAMS = \ 119 $(NULL) 120## 121edit_sgml_SOURCES = \ 122 edit-sgml.c \ 123 $(NULL) 124edit_sgml_CC = $(CC_FOR_BUILD) 125# 126check_SCRIPTS = \ 127 check-missing-doc \ 128 $(NULL) 129# 130man3_MANS = \ 131 $(DOCMAN3) \ 132 $(NULL) 133man5_MANS = \ 134 fonts-conf.5 \ 135 $(NULL) 136# 137doc_DATA = \ 138 $(TXT_FILES) \ 139 $(PDF_FILES) \ 140 $(HTML_FILES) \ 141 $(NULL) 142# 143htmldocdir = $(docdir)/$(HTML_DIR) 144htmldoc_DATA = \ 145 $(NULL) 146 147if USEDOCBOOK 148BUILT_SOURCES += \ 149 $(LOCAL_SGML_FILES) \ 150 $(NULL) 151noinst_PROGRAMS += \ 152 edit-sgml \ 153 $(NULL) 154htmldoc_DATA += $(HTML_DIR)/* 155 156## 157.fncs.sgml: 158 $(AM_V_GEN) $(RM) $@; \ 159 $(builddir)/edit-sgml$(EXEEXT) $(srcdir)/func.sgml < '$(srcdir)/$*.fncs' > $*.sgml 160.sgml.txt: 161 $(AM_V_GEN) $(RM) $@; \ 162 $(DOC2TXT) $*.sgml 163.sgml.pdf: 164 $(AM_V_GEN) $(RM) $@; \ 165 $(DOC2PDF) $*.sgml 166.sgml.html: 167 $(AM_V_GEN) $(RM) $@; \ 168 $(DOC2HTML) -u $*.sgml > $@ 169## 170fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml 171 $(AM_V_GEN) $(RM) $@; \ 172 $(DOC2MAN) local-fontconfig-user.sgml && \ 173 $(RM) manpage.* 174## 175$(man3_MANS): func.refs 176func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS) 177 $(AM_V_GEN) $(RM) $@; \ 178 $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \ 179 mv devel-man/manpage.refs func.refs && \ 180 mv devel-man/*.3 . && \ 181 $(RM) devel-man/manpage.* && \ 182 rmdir devel-man || rm $@ || : 183confdir.sgml: $(srcdir)/confdir.sgml.in 184 $(AM_V_GEN) sed -e 's,@CONFDIR\@,${CONFDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@ 185## 186$(DOC_FUNCS_SGML): $(DOC_FUNCS_FNCS) edit-sgml$(EXEEXT) $(srcdir)/func.sgml 187$(TXT_FILES): $(DOCS_DEPS) 188$(PDF_FILES): $(DOCS_DEPS) 189$(HTML_FILES): $(DOCS_DEPS) 190$(HTML_DIR)/*: $(HTML_DIR) 191$(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS) 192 $(AM_V_GEN) $(RM) -r $@; \ 193 $(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml 194local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml 195 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@; \ 196 [ ! -f $(builddir)/fontconfig-user.sgml ] && cp -a $(srcdir)/fontconfig-user.sgml $(builddir)/fontconfig-user.sgml || : 197local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml 198 $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@; \ 199 [ ! -f $(builddir)/fontconfig-devel.sgml ] && cp -a $(srcdir)/fontconfig-devel.sgml $(builddir)/fontconfig-devel.sgml || : 200# 201all-local: $(BUILT_DOCS) $(HTML_DIR)/* 202clean-local: 203 $(RM) -r $(HTML_DIR) devel-man 204 [ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || : 205dist-local-check-docs-enabled: 206 @true 207else 208htmldoc_DATA += $(srcdir)/$(HTML_DIR)/* 209all-local: 210clean-local: 211dist-local-check-docs-enabled: 212 @echo "*** --enable-man must be used in order to make dist" 213 @false 214endif 215 216# force doc rebulid after configure 217dist-hook-local: dist-local-check-docs-enabled 218 219-include $(top_srcdir)/git.mk 220