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 EXEEXT = @EXEEXT_FOR_BUILD@
26 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
29 DOC_MODULE = fontconfig
30 DOC2HTML = docbook2html
35 TXT = fontconfig-user.txt fontconfig-devel.txt
36 PDF = fontconfig-user.pdf fontconfig-devel.pdf
37 HTML_FILES = fontconfig-user.html
38 HTML_DIR = fontconfig-devel
39 SGML = fontconfig-user.sgml fontconfig-devel.sgml
40 FNCS_TMPL = ${DOC_SRC}/func.sgml
78 man_MANS=fonts-conf.5 @DOCMAN3@
80 noinst_PROGRAMS=edit-sgml
81 edit_sgml_SOURCES=edit-sgml.c
85 DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
86 LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(HTML_DIR)/*
88 EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in
90 SUFFIXES=.fncs .sgml .txt .html
96 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
106 $(man_MANS): func.refs
108 func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
110 $(DOC2MAN) local-fontconfig-devel.sgml
111 mv manpage.refs func.refs
114 local-fontconfig-devel.sgml: fontconfig-devel.sgml
117 $(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
119 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
121 $(DOC2MAN) local-fontconfig-user.sgml
122 $(RM) manpage.refs manpage.links
124 local-fontconfig-user.sgml: fontconfig-user.sgml
127 all-local: $(LOCAL_DOCS)
130 $(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
133 $(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
135 $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml
137 fontconfig-devel.txt: local-fontconfig-devel.sgml version.sgml confdir.sgml
139 $(DOC2TXT) local-fontconfig-devel.sgml
140 mv local-fontconfig-devel.txt $@
142 fontconfig-devel.pdf: local-fontconfig-devel.sgml version.sgml confdir.sgml
144 $(DOC2PDF) local-fontconfig-devel.sgml
145 mv local-fontconfig-devel.pdf $@
147 fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
148 $(RM) $@ local-$@ $@.tmp
149 $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
150 -test -f local-$@ && mv local-$@ $@
151 -test -f $@ || mv $@.tmp $@
152 -test -f $@.tmp && $(RM) $@.tmp
154 fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
156 $(DOC2TXT) local-fontconfig-user.sgml
157 mv local-fontconfig-user.txt $@
159 fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
161 $(DOC2PDF) local-fontconfig-user.sgml
162 mv local-fontconfig-user.pdf $@
164 STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
165 confdir.sgml: ${DOC_SRC}/confdir.sgml.in
166 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
168 CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
175 htmldocdir=$(docdir)/$(HTML_DIR)
177 doc_DATA = $(DOC_FILES)
179 htmldoc_DATA = $(HTML_DIR)/*
181 $(HTML_DIR)/*: $(HTML_DIR)