4 # Copyright © 2003 Keith Packard
6 # Permission to use, copy, modify, distribute, and sell this software and its
7 # documentation for any purpose is hereby granted without fee, provided that
8 # the above copyright notice appear in all copies and that both that
9 # copyright notice and this permission notice appear in supporting
10 # documentation, and that the name of Keith Packard not be used in
11 # advertising or publicity pertaining to distribution of the software without
12 # specific, written prior permission. Keith Packard makes no
13 # representations about the suitability of this software for any purpose. It
14 # is provided "as is" without express or implied warranty.
16 # KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 # EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 # PERFORMANCE OF THIS SOFTWARE.
25 DOC_MODULE = fontconfig
26 DOC2HTML = docbook2html
30 TXT = fontconfig-user.txt fontconfig-devel.txt
31 HTML_FILES = fontconfig-user.html
32 HTML_DIR = fontconfig-devel
33 SGML = fontconfig-user.sgml fontconfig-devel.sgml
34 FNCS_TMPL = ${DOC_SRC}/func.sgml
72 man_MANS=fonts-conf.5 @DOCMAN3@
74 noinst_PROGRAMS=edit-sgml
75 edit_sgml_SOURCES=edit-sgml.c
79 DOC_FILES=$(TXT) $(HTML_FILES)
80 LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(HTML_DIR)/*
82 EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in
84 SUFFIXES=.fncs .sgml .txt .html
90 ./edit-sgml $(FNCS_TMPL) < '$<' > $*.sgml
96 $(man_MANS): func.refs
98 func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
100 $(DOC2MAN) local-fontconfig-devel.sgml
101 mv manpage.refs func.refs
104 local-fontconfig-devel.sgml: fontconfig-devel.sgml
107 $(DOC_FUNCS_SGML): edit-sgml $(FNCS_TMPL)
109 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
111 $(DOC2MAN) local-fontconfig-user.sgml
112 $(RM) manpage.refs manpage.links
114 local-fontconfig-user.sgml: fontconfig-user.sgml
117 all-local: $(LOCAL_DOCS)
120 $(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
123 $(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
125 $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml
127 fontconfig-devel.txt: local-fontconfig-devel.sgml version.sgml confdir.sgml
129 $(DOC2TXT) local-fontconfig-devel.sgml
130 mv local-fontconfig-devel.txt $@
132 fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
133 $(RM) $@ local-$@ $@.tmp
134 $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
135 -test -f local-$@ && mv local-$@ $@
136 -test -f $@ || mv $@.tmp $@
138 fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
140 $(DOC2TXT) local-fontconfig-user.sgml
141 mv local-fontconfig-user.txt $@
143 STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
144 confdir.sgml: ${DOC_SRC}/confdir.sgml.in
145 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
147 CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
154 htmldocdir=$(docdir)/$(HTML_DIR)
156 doc_DATA = $(DOC_FILES)
158 htmldoc_DATA = $(HTML_DIR)/*
160 $(HTML_DIR)/*: $(HTML_DIR)