]> git.wh0rd.org - fontconfig.git/blame - doc/Makefile.am
Update blanks list (Closes bug 86)
[fontconfig.git] / doc / Makefile.am
CommitLineData
394b2bf0
KP
1#
2# $Id$
3#
4# Copyright © 2003 Keith Packard
5#
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.
15#
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.
23
4cbc3ee8 24DOC_SRC = $(srcdir)
b219ac6b
KP
25DOC_MODULE = fontconfig
26DOC2HTML = docbook2html
27DOC2TXT = docbook2txt
28DOC2MAN = docbook2man
0da305f7 29
b219ac6b
KP
30TXT = fontconfig-user.txt fontconfig-devel.txt
31HTML_FILES = fontconfig-user.html
4cbc3ee8
KP
32HTML_DIR = fontconfig-devel
33SGML = fontconfig-user.sgml fontconfig-devel.sgml
394b2bf0 34FNCS_TMPL = ${DOC_SRC}/func.sgml
0da305f7 35
22671e25 36DOC_FUNCS_FNCS=\
b219ac6b
KP
37 fcatomic.fncs \
38 fcblanks.fncs \
22671e25 39 fccharset.fncs \
b219ac6b
KP
40 fcconfig.fncs \
41 fcconstant.fncs \
42 fcfile.fncs \
bfc2dc3a 43 fcfontset.fncs \
b219ac6b
KP
44 fcfreetype.fncs \
45 fcinit.fncs \
46 fcmatrix.fncs \
bfc2dc3a
KP
47 fcobjectset.fncs \
48 fcobjecttype.fncs \
b219ac6b
KP
49 fcpattern.fncs \
50 fcstring.fncs \
39381776 51 fcstrset.fncs \
b219ac6b 52 fcvalue.fncs
34cd0514 53
22671e25 54DOC_FUNCS_SGML=\
b219ac6b
KP
55 fcatomic.sgml \
56 fcblanks.sgml \
22671e25 57 fccharset.sgml \
b219ac6b
KP
58 fcconfig.sgml \
59 fcconstant.sgml \
60 fcfile.sgml \
bfc2dc3a 61 fcfontset.sgml \
b219ac6b
KP
62 fcfreetype.sgml \
63 fcinit.sgml \
64 fcmatrix.sgml \
bfc2dc3a
KP
65 fcobjectset.sgml \
66 fcobjecttype.sgml \
b219ac6b
KP
67 fcpattern.sgml \
68 fcstring.sgml \
39381776 69 fcstrset.sgml \
b219ac6b
KP
70 fcvalue.sgml
71
4cbc3ee8 72man_MANS=fonts-conf.5 @DOCMAN3@
22671e25
KP
73
74noinst_PROGRAMS=edit-sgml
75edit_sgml_SOURCES=edit-sgml.c
76
4cbc3ee8 77docdir=@DOCDIR@
0da305f7 78
bdc0fd54 79DOC_FILES=$(TXT) $(HTML_FILES)
4cbc3ee8 80LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(HTML_DIR)/*
bdc0fd54 81
e99043ac 82EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in
34cd0514 83
22671e25 84SUFFIXES=.fncs .sgml .txt .html
0da305f7 85
2b45ef3a 86if USEDOCBOOK
bdc0fd54 87
22671e25 88.fncs.sgml:
0da305f7 89 $(RM) $@
4cbc3ee8 90 ./edit-sgml $(FNCS_TMPL) < '$<' > $*.sgml
0da305f7
KP
91
92.sgml.txt:
93 $(RM) $@
394b2bf0 94 $(DOC2TXT) $<
0da305f7 95
bdc0fd54 96$(man_MANS): func.refs
9238fc06 97
4cbc3ee8 98func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
b219ac6b 99 $(RM) func.refs
4cbc3ee8 100 $(DOC2MAN) local-fontconfig-devel.sgml
b219ac6b
KP
101 mv manpage.refs func.refs
102 $(RM) manpage.links
22671e25 103
4cbc3ee8
KP
104local-fontconfig-devel.sgml: fontconfig-devel.sgml
105 $(LN_S) $< $@
106
bdc0fd54 107$(DOC_FUNCS_SGML): edit-sgml $(FNCS_TMPL)
22671e25 108
4cbc3ee8
KP
109fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
110 $(RM) $@
111 $(DOC2MAN) local-fontconfig-user.sgml
b219ac6b 112 $(RM) manpage.refs manpage.links
4cbc3ee8
KP
113
114local-fontconfig-user.sgml: fontconfig-user.sgml
115 $(LN_S) $< $@
b219ac6b 116
4484582e 117all-local: $(LOCAL_DOCS)
22671e25 118
4484582e 119clean-local:
bdc0fd54 120 $(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
4cbc3ee8 121 $(RM) -r $(HTML_DIR)
22671e25 122
4cbc3ee8
KP
123$(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
124 $(RM) -r $(HTML_DIR)
125 $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml
394b2bf0 126
4cbc3ee8
KP
127fontconfig-devel.txt: local-fontconfig-devel.sgml version.sgml confdir.sgml
128 $(RM) $@
129 $(DOC2TXT) local-fontconfig-devel.sgml
130 mv local-fontconfig-devel.txt $@
394b2bf0 131
4cbc3ee8
KP
132fontconfig-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 $@
408dd9c0 137 -test -f $@.tmp && $(RM) $@.tmp
394b2bf0 138
4cbc3ee8
KP
139fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
140 $(RM) $@
141 $(DOC2TXT) local-fontconfig-user.sgml
142 mv local-fontconfig-user.txt $@
4b4f42ab 143
f946755c 144STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
394b2bf0
KP
145confdir.sgml: ${DOC_SRC}/confdir.sgml.in
146 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
147
4cbc3ee8 148CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
4b4f42ab 149
bdc0fd54
KP
150else
151all-local:
152clean-local:
153endif
154
4cbc3ee8
KP
155htmldocdir=$(docdir)/$(HTML_DIR)
156
157doc_DATA = $(DOC_FILES)
158
159htmldoc_DATA = $(HTML_DIR)/*
160
161$(HTML_DIR)/*: $(HTML_DIR)