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