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
34 TXT = fontconfig-user.txt fontconfig-devel.txt
35 HTML_FILES = fontconfig-user.html
36 HTML_DIR = fontconfig-devel
37 SGML = fontconfig-user.sgml fontconfig-devel.sgml
38 FNCS_TMPL = ${DOC_SRC}/func.sgml
76 man_MANS=fonts-conf.5 @DOCMAN3@
78 noinst_PROGRAMS=edit-sgml
79 edit_sgml_SOURCES=edit-sgml.c
83 DOC_FILES=$(TXT) $(HTML_FILES)
84 LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(HTML_DIR)/*
86 EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in
88 SUFFIXES=.fncs .sgml .txt .html
94 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
100 $(man_MANS): func.refs
102 func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
104 $(DOC2MAN) local-fontconfig-devel.sgml
105 mv manpage.refs func.refs
108 local-fontconfig-devel.sgml: fontconfig-devel.sgml
111 $(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
113 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
115 $(DOC2MAN) local-fontconfig-user.sgml
116 $(RM) manpage.refs manpage.links
118 local-fontconfig-user.sgml: fontconfig-user.sgml
121 all-local: $(LOCAL_DOCS)
124 $(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
127 $(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
129 $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml
131 fontconfig-devel.txt: local-fontconfig-devel.sgml version.sgml confdir.sgml
133 $(DOC2TXT) local-fontconfig-devel.sgml
134 mv local-fontconfig-devel.txt $@
136 fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
137 $(RM) $@ local-$@ $@.tmp
138 $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
139 -test -f local-$@ && mv local-$@ $@
140 -test -f $@ || mv $@.tmp $@
141 -test -f $@.tmp && $(RM) $@.tmp
143 fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
145 $(DOC2TXT) local-fontconfig-user.sgml
146 mv local-fontconfig-user.txt $@
148 STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
149 confdir.sgml: ${DOC_SRC}/confdir.sgml.in
150 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
152 CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
159 htmldocdir=$(docdir)/$(HTML_DIR)
161 doc_DATA = $(DOC_FILES)
163 htmldoc_DATA = $(HTML_DIR)/*
165 $(HTML_DIR)/*: $(HTML_DIR)