]>
Commit | Line | Data |
---|---|---|
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 | 24 | DOC_SRC = $(srcdir) |
b219ac6b KP |
25 | DOC_MODULE = fontconfig |
26 | DOC2HTML = docbook2html | |
27 | DOC2TXT = docbook2txt | |
28 | DOC2MAN = docbook2man | |
0da305f7 | 29 | |
b219ac6b KP |
30 | TXT = fontconfig-user.txt fontconfig-devel.txt |
31 | HTML_FILES = fontconfig-user.html | |
4cbc3ee8 KP |
32 | HTML_DIR = fontconfig-devel |
33 | SGML = fontconfig-user.sgml fontconfig-devel.sgml | |
394b2bf0 | 34 | FNCS_TMPL = ${DOC_SRC}/func.sgml |
0da305f7 | 35 | |
22671e25 | 36 | DOC_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 | 54 | DOC_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 | 72 | man_MANS=fonts-conf.5 @DOCMAN3@ |
22671e25 KP |
73 | |
74 | noinst_PROGRAMS=edit-sgml | |
75 | edit_sgml_SOURCES=edit-sgml.c | |
76 | ||
4cbc3ee8 | 77 | docdir=@DOCDIR@ |
0da305f7 | 78 | |
bdc0fd54 | 79 | DOC_FILES=$(TXT) $(HTML_FILES) |
4cbc3ee8 | 80 | LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(HTML_DIR)/* |
bdc0fd54 | 81 | |
e99043ac | 82 | EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in |
34cd0514 | 83 | |
22671e25 | 84 | SUFFIXES=.fncs .sgml .txt .html |
0da305f7 | 85 | |
2b45ef3a | 86 | if 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 | 98 | func.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 |
104 | local-fontconfig-devel.sgml: fontconfig-devel.sgml |
105 | $(LN_S) $< $@ | |
106 | ||
bdc0fd54 | 107 | $(DOC_FUNCS_SGML): edit-sgml $(FNCS_TMPL) |
22671e25 | 108 | |
4cbc3ee8 KP |
109 | fonts-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 | |
114 | local-fontconfig-user.sgml: fontconfig-user.sgml | |
115 | $(LN_S) $< $@ | |
b219ac6b | 116 | |
4484582e | 117 | all-local: $(LOCAL_DOCS) |
22671e25 | 118 | |
4484582e | 119 | clean-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 |
127 | fontconfig-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 |
132 | fontconfig-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 $@ | |
394b2bf0 | 137 | |
4cbc3ee8 KP |
138 | fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml |
139 | $(RM) $@ | |
140 | $(DOC2TXT) local-fontconfig-user.sgml | |
141 | mv local-fontconfig-user.txt $@ | |
4b4f42ab | 142 | |
f946755c | 143 | STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }' |
394b2bf0 KP |
144 | confdir.sgml: ${DOC_SRC}/confdir.sgml.in |
145 | sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml | |
146 | ||
4cbc3ee8 | 147 | CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml |
4b4f42ab | 148 | |
bdc0fd54 KP |
149 | else |
150 | all-local: | |
151 | clean-local: | |
152 | endif | |
153 | ||
4cbc3ee8 KP |
154 | htmldocdir=$(docdir)/$(HTML_DIR) |
155 | ||
156 | doc_DATA = $(DOC_FILES) | |
157 | ||
158 | htmldoc_DATA = $(HTML_DIR)/* | |
159 | ||
160 | $(HTML_DIR)/*: $(HTML_DIR) |