]> git.wh0rd.org - fontconfig.git/blame_incremental - doc/Makefile.am
Create prototype /etc/fonts/conf.d directory with a few sample
[fontconfig.git] / doc / Makefile.am
... / ...
CommitLineData
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
24CC = @CC_FOR_BUILD@
25EXEEXT = @EXEEXT_FOR_BUILD@
26LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
27
28DOC_SRC = $(srcdir)
29DOC_MODULE = fontconfig
30DOC2HTML = docbook2html
31DOC2TXT = docbook2txt
32DOC2MAN = docbook2man
33
34TXT = fontconfig-user.txt fontconfig-devel.txt
35HTML_FILES = fontconfig-user.html
36HTML_DIR = fontconfig-devel
37SGML = fontconfig-user.sgml fontconfig-devel.sgml
38FNCS_TMPL = ${DOC_SRC}/func.sgml
39
40DOC_FUNCS_FNCS=\
41 fcatomic.fncs \
42 fcblanks.fncs \
43 fccharset.fncs \
44 fcconfig.fncs \
45 fcconstant.fncs \
46 fcfile.fncs \
47 fcfontset.fncs \
48 fcfreetype.fncs \
49 fcinit.fncs \
50 fcmatrix.fncs \
51 fcobjectset.fncs \
52 fcobjecttype.fncs \
53 fcpattern.fncs \
54 fcstring.fncs \
55 fcstrset.fncs \
56 fcvalue.fncs
57
58DOC_FUNCS_SGML=\
59 fcatomic.sgml \
60 fcblanks.sgml \
61 fccharset.sgml \
62 fcconfig.sgml \
63 fcconstant.sgml \
64 fcfile.sgml \
65 fcfontset.sgml \
66 fcfreetype.sgml \
67 fcinit.sgml \
68 fcmatrix.sgml \
69 fcobjectset.sgml \
70 fcobjecttype.sgml \
71 fcpattern.sgml \
72 fcstring.sgml \
73 fcstrset.sgml \
74 fcvalue.sgml
75
76man_MANS=fonts-conf.5 @DOCMAN3@
77
78noinst_PROGRAMS=edit-sgml
79edit_sgml_SOURCES=edit-sgml.c
80
81docdir=@DOCDIR@
82
83DOC_FILES=$(TXT) $(HTML_FILES)
84LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(HTML_DIR)/*
85
86EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in
87
88SUFFIXES=.fncs .sgml .txt .html
89
90if USEDOCBOOK
91
92.fncs.sgml:
93 $(RM) $@
94 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
95
96.sgml.txt:
97 $(RM) $@
98 $(DOC2TXT) $<
99
100$(man_MANS): func.refs
101
102func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
103 $(RM) func.refs
104 $(DOC2MAN) local-fontconfig-devel.sgml
105 mv manpage.refs func.refs
106 $(RM) manpage.links
107
108local-fontconfig-devel.sgml: fontconfig-devel.sgml
109 $(LN_S) $< $@
110
111$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
112
113fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
114 $(RM) $@
115 $(DOC2MAN) local-fontconfig-user.sgml
116 $(RM) manpage.refs manpage.links
117
118local-fontconfig-user.sgml: fontconfig-user.sgml
119 $(LN_S) $< $@
120
121all-local: $(LOCAL_DOCS)
122
123clean-local:
124 $(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
125 $(RM) -r $(HTML_DIR)
126
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
130
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 $@
135
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 $@
141 -test -f $@.tmp && $(RM) $@.tmp
142
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 $@
147
148STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
149confdir.sgml: ${DOC_SRC}/confdir.sgml.in
150 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
151
152CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
153
154else
155all-local:
156clean-local:
157endif
158
159htmldocdir=$(docdir)/$(HTML_DIR)
160
161doc_DATA = $(DOC_FILES)
162
163htmldoc_DATA = $(HTML_DIR)/*
164
165$(HTML_DIR)/*: $(HTML_DIR)