]>
Commit | Line | Data |
---|---|---|
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 | ||
24 | CC = @CC_FOR_BUILD@ | |
25 | EXEEXT = @EXEEXT_FOR_BUILD@ | |
26 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ | |
27 | ||
28 | DOC_SRC = $(srcdir) | |
29 | DOC_MODULE = fontconfig | |
30 | DOC2HTML = docbook2html | |
31 | DOC2TXT = docbook2txt | |
32 | DOC2MAN = docbook2man | |
33 | ||
34 | TXT = fontconfig-user.txt fontconfig-devel.txt | |
35 | HTML_FILES = fontconfig-user.html | |
36 | HTML_DIR = fontconfig-devel | |
37 | SGML = fontconfig-user.sgml fontconfig-devel.sgml | |
38 | FNCS_TMPL = ${DOC_SRC}/func.sgml | |
39 | ||
40 | DOC_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 | ||
58 | DOC_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 | ||
76 | man_MANS=fonts-conf.5 @DOCMAN3@ | |
77 | ||
78 | noinst_PROGRAMS=edit-sgml | |
79 | edit_sgml_SOURCES=edit-sgml.c | |
80 | ||
81 | docdir=@DOCDIR@ | |
82 | ||
83 | DOC_FILES=$(TXT) $(HTML_FILES) | |
84 | LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(HTML_DIR)/* | |
85 | ||
86 | EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in | |
87 | ||
88 | SUFFIXES=.fncs .sgml .txt .html | |
89 | ||
90 | if 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 | ||
102 | func.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 | ||
108 | local-fontconfig-devel.sgml: fontconfig-devel.sgml | |
109 | $(LN_S) $< $@ | |
110 | ||
111 | $(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL) | |
112 | ||
113 | fonts-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 | ||
118 | local-fontconfig-user.sgml: fontconfig-user.sgml | |
119 | $(LN_S) $< $@ | |
120 | ||
121 | all-local: $(LOCAL_DOCS) | |
122 | ||
123 | clean-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 | ||
131 | fontconfig-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 | ||
136 | fontconfig-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 | ||
143 | fontconfig-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 | ||
148 | STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }' | |
149 | confdir.sgml: ${DOC_SRC}/confdir.sgml.in | |
150 | sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml | |
151 | ||
152 | CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml | |
153 | ||
154 | else | |
155 | all-local: | |
156 | clean-local: | |
157 | endif | |
158 | ||
159 | htmldocdir=$(docdir)/$(HTML_DIR) | |
160 | ||
161 | doc_DATA = $(DOC_FILES) | |
162 | ||
163 | htmldoc_DATA = $(HTML_DIR)/* | |
164 | ||
165 | $(HTML_DIR)/*: $(HTML_DIR) |