]> git.wh0rd.org - fontconfig.git/blame_incremental - doc/Makefile.am
A few fixups for make distcheck
[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
33DOC2PDF = docbook2pdf
34
35TXT = fontconfig-user.txt fontconfig-devel.txt
36PDF = fontconfig-user.pdf fontconfig-devel.pdf
37HTML_FILES = fontconfig-user.html
38HTML_DIR = fontconfig-devel
39SGML = fontconfig-user.sgml fontconfig-devel.sgml
40FNCS_TMPL = ${DOC_SRC}/func.sgml
41
42DOC_FUNCS_FNCS=\
43 fcatomic.fncs \
44 fcblanks.fncs \
45 fccharset.fncs \
46 fcconfig.fncs \
47 fcconstant.fncs \
48 fcfile.fncs \
49 fcfontset.fncs \
50 fcfreetype.fncs \
51 fcinit.fncs \
52 fcmatrix.fncs \
53 fcobjectset.fncs \
54 fcobjecttype.fncs \
55 fcpattern.fncs \
56 fcstring.fncs \
57 fcstrset.fncs \
58 fcvalue.fncs
59
60DOC_FUNCS_SGML=\
61 fcatomic.sgml \
62 fcblanks.sgml \
63 fccharset.sgml \
64 fcconfig.sgml \
65 fcconstant.sgml \
66 fcfile.sgml \
67 fcfontset.sgml \
68 fcfreetype.sgml \
69 fcinit.sgml \
70 fcmatrix.sgml \
71 fcobjectset.sgml \
72 fcobjecttype.sgml \
73 fcpattern.sgml \
74 fcstring.sgml \
75 fcstrset.sgml \
76 fcvalue.sgml
77
78man5_MANS=fonts-conf.5
79man3_MANS=$(DOCMAN3)
80
81noinst_PROGRAMS=edit-sgml
82edit_sgml_SOURCES=edit-sgml.c
83
84docdir=@DOCDIR@
85
86DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
87LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/*
88
89EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) func.sgml confdir.sgml.in
90
91SUFFIXES=.fncs .sgml .txt .html
92
93if USEDOCBOOK
94
95.fncs.sgml:
96 $(RM) $@
97 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
98
99.sgml.txt:
100 $(RM) $@
101 $(DOC2TXT) $<
102
103.sgml.pdf:
104 $(RM) $@
105 $(DOC2PDF) $<
106
107$(man3_MANS): func.refs
108
109func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
110 $(RM) func.refs
111 $(DOC2MAN) local-fontconfig-devel.sgml && \
112 mv manpage.refs func.refs
113 $(RM) manpage.links
114
115local-fontconfig-devel.sgml: fontconfig-devel.sgml
116 $(LN_S) $< $@
117
118$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
119
120fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
121 $(RM) $@
122 $(DOC2MAN) local-fontconfig-user.sgml && \
123 $(RM) manpage.refs manpage.links
124
125local-fontconfig-user.sgml: fontconfig-user.sgml
126 $(LN_S) $< $@
127
128all-local: $(LOCAL_DOCS)
129
130clean-local:
131 $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
132 $(RM) -r $(HTML_DIR)
133
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
137
138fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
139 $(RM) $@
140 $(DOC2TXT) local-fontconfig-devel.sgml
141 mv local-fontconfig-devel.txt $@
142
143fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
144 $(RM) $@
145 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
146 || echo Failed to generate $@ >&2; \
147 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
148
149fontconfig-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 $@
154 -test -f $@.tmp && $(RM) $@.tmp
155
156fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
157 $(RM) $@
158 $(DOC2TXT) local-fontconfig-user.sgml
159 mv local-fontconfig-user.txt $@
160
161fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
162 $(RM) $@
163 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
164 || echo Failed to generate $@ >&2; \
165 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
166
167STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
168confdir.sgml: ${DOC_SRC}/confdir.sgml.in
169 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
170
171CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
172
173htmldoc_DATA = $(HTML_DIR)/*
174
175$(HTML_DIR)/*: $(HTML_DIR)
176
177else
178
179htmldoc_DATA = $(srcdir)/$(HTML_DIR)/*
180
181all-local:
182clean-local:
183endif
184
185htmldocdir=$(docdir)/$(HTML_DIR)
186
187doc_DATA = $(DOC_FILES)
188