]>
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 | ||
d8ae9c92 KP |
24 | CC = @CC_FOR_BUILD@ |
25 | EXEEXT = @EXEEXT_FOR_BUILD@ | |
26 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ | |
27 | ||
4cbc3ee8 | 28 | DOC_SRC = $(srcdir) |
b219ac6b KP |
29 | DOC_MODULE = fontconfig |
30 | DOC2HTML = docbook2html | |
31 | DOC2TXT = docbook2txt | |
32 | DOC2MAN = docbook2man | |
0c009d2b | 33 | DOC2PDF = docbook2pdf |
0da305f7 | 34 | |
b219ac6b | 35 | TXT = fontconfig-user.txt fontconfig-devel.txt |
0c009d2b | 36 | PDF = fontconfig-user.pdf fontconfig-devel.pdf |
b219ac6b | 37 | HTML_FILES = fontconfig-user.html |
4cbc3ee8 KP |
38 | HTML_DIR = fontconfig-devel |
39 | SGML = fontconfig-user.sgml fontconfig-devel.sgml | |
394b2bf0 | 40 | FNCS_TMPL = ${DOC_SRC}/func.sgml |
0da305f7 | 41 | |
22671e25 | 42 | DOC_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 | 60 | DOC_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 | ||
dc2e06ab KP |
78 | man5_MANS=fonts-conf.5 |
79 | man3_MANS=$(DOCMAN3) | |
22671e25 KP |
80 | |
81 | noinst_PROGRAMS=edit-sgml | |
82 | edit_sgml_SOURCES=edit-sgml.c | |
83 | ||
4cbc3ee8 | 84 | docdir=@DOCDIR@ |
0da305f7 | 85 | |
0c009d2b | 86 | DOC_FILES=$(TXT) $(PDF) $(HTML_FILES) |
dc2e06ab | 87 | LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/* |
bdc0fd54 | 88 | |
788c4af2 | 89 | EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) func.sgml confdir.sgml.in |
34cd0514 | 90 | |
22671e25 | 91 | SUFFIXES=.fncs .sgml .txt .html |
0da305f7 | 92 | |
2b45ef3a | 93 | if USEDOCBOOK |
bdc0fd54 | 94 | |
22671e25 | 95 | .fncs.sgml: |
0da305f7 | 96 | $(RM) $@ |
d8ae9c92 | 97 | ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml |
0da305f7 KP |
98 | |
99 | .sgml.txt: | |
100 | $(RM) $@ | |
394b2bf0 | 101 | $(DOC2TXT) $< |
0da305f7 | 102 | |
0c009d2b KP |
103 | .sgml.pdf: |
104 | $(RM) $@ | |
105 | $(DOC2PDF) $< | |
106 | ||
dc2e06ab | 107 | $(man3_MANS): func.refs |
9238fc06 | 108 | |
4cbc3ee8 | 109 | func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml |
b219ac6b | 110 | $(RM) func.refs |
28a4ea7f | 111 | $(DOC2MAN) local-fontconfig-devel.sgml && \ |
b219ac6b KP |
112 | mv manpage.refs func.refs |
113 | $(RM) manpage.links | |
22671e25 | 114 | |
4cbc3ee8 KP |
115 | local-fontconfig-devel.sgml: fontconfig-devel.sgml |
116 | $(LN_S) $< $@ | |
117 | ||
d8ae9c92 | 118 | $(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL) |
22671e25 | 119 | |
4cbc3ee8 KP |
120 | fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml |
121 | $(RM) $@ | |
89d6119c | 122 | $(DOC2MAN) local-fontconfig-user.sgml && \ |
b219ac6b | 123 | $(RM) manpage.refs manpage.links |
4cbc3ee8 KP |
124 | |
125 | local-fontconfig-user.sgml: fontconfig-user.sgml | |
126 | $(LN_S) $< $@ | |
b219ac6b | 127 | |
4484582e | 128 | all-local: $(LOCAL_DOCS) |
22671e25 | 129 | |
4484582e | 130 | clean-local: |
dc2e06ab | 131 | $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs |
4cbc3ee8 | 132 | $(RM) -r $(HTML_DIR) |
22671e25 | 133 | |
4cbc3ee8 KP |
134 | $(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml |
135 | $(RM) -r $(HTML_DIR) | |
136 | $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml | |
394b2bf0 | 137 | |
dc2e06ab | 138 | fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml |
4cbc3ee8 KP |
139 | $(RM) $@ |
140 | $(DOC2TXT) local-fontconfig-devel.sgml | |
141 | mv local-fontconfig-devel.txt $@ | |
394b2bf0 | 142 | |
dc2e06ab | 143 | fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml |
0c009d2b | 144 | $(RM) $@ |
2cae0512 | 145 | $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \ |
af2ad236 PL |
146 | || echo Failed to generate $@ >&2; \ |
147 | (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@) | |
0c009d2b | 148 | |
4cbc3ee8 KP |
149 | fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml |
150 | $(RM) $@ local-$@ $@.tmp | |
151 | $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp | |
152 | -test -f local-$@ && mv local-$@ $@ | |
153 | -test -f $@ || mv $@.tmp $@ | |
408dd9c0 | 154 | -test -f $@.tmp && $(RM) $@.tmp |
394b2bf0 | 155 | |
4cbc3ee8 KP |
156 | fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml |
157 | $(RM) $@ | |
158 | $(DOC2TXT) local-fontconfig-user.sgml | |
159 | mv local-fontconfig-user.txt $@ | |
4b4f42ab | 160 | |
0c009d2b KP |
161 | fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml |
162 | $(RM) $@ | |
2cae0512 | 163 | $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \ |
af2ad236 PL |
164 | || echo Failed to generate $@ >&2; \ |
165 | (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@) | |
0c009d2b | 166 | |
f946755c | 167 | STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }' |
394b2bf0 KP |
168 | confdir.sgml: ${DOC_SRC}/confdir.sgml.in |
169 | sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml | |
170 | ||
4cbc3ee8 | 171 | CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml |
4b4f42ab | 172 | |
2cae0512 PB |
173 | htmldoc_DATA = $(HTML_DIR)/* |
174 | ||
175 | $(HTML_DIR)/*: $(HTML_DIR) | |
176 | ||
bdc0fd54 | 177 | else |
2cae0512 PB |
178 | |
179 | htmldoc_DATA = $(srcdir)/$(HTML_DIR)/* | |
180 | ||
bdc0fd54 KP |
181 | all-local: |
182 | clean-local: | |
183 | endif | |
184 | ||
4cbc3ee8 KP |
185 | htmldocdir=$(docdir)/$(HTML_DIR) |
186 | ||
187 | doc_DATA = $(DOC_FILES) | |
188 |