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