]> git.wh0rd.org - fontconfig.git/blame - doc/Makefile.am
Cleanup copyright notices to replace "Keith Packard" with "the author(s)"
[fontconfig.git] / doc / Makefile.am
CommitLineData
394b2bf0 1#
e690fbb2 2# fontconfig/doc/Makefile.am
394b2bf0
KP
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
5aaf466d 10# documentation, and that the name of the author(s) not be used in
394b2bf0 11# advertising or publicity pertaining to distribution of the software without
5aaf466d 12# specific, written prior permission. The authors make no
394b2bf0
KP
13# representations about the suitability of this software for any purpose. It
14# is provided "as is" without express or implied warranty.
15#
3074a73b 16# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
394b2bf0 17# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
3074a73b 18# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
394b2bf0
KP
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
24CC = @CC_FOR_BUILD@
25EXEEXT = @EXEEXT_FOR_BUILD@
26LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
27
4cbc3ee8 28DOC_SRC = $(srcdir)
b219ac6b
KP
29DOC_MODULE = fontconfig
30DOC2HTML = docbook2html
31DOC2TXT = docbook2txt
32DOC2MAN = docbook2man
0c009d2b 33DOC2PDF = docbook2pdf
0da305f7 34
b219ac6b 35TXT = fontconfig-user.txt fontconfig-devel.txt
0c009d2b 36PDF = fontconfig-user.pdf fontconfig-devel.pdf
b219ac6b 37HTML_FILES = fontconfig-user.html
4cbc3ee8
KP
38HTML_DIR = fontconfig-devel
39SGML = fontconfig-user.sgml fontconfig-devel.sgml
394b2bf0 40FNCS_TMPL = ${DOC_SRC}/func.sgml
0da305f7 41
22671e25 42DOC_FUNCS_FNCS=\
b219ac6b
KP
43 fcatomic.fncs \
44 fcblanks.fncs \
a190678e 45 fccache.fncs \
22671e25 46 fccharset.fncs \
b219ac6b
KP
47 fcconfig.fncs \
48 fcconstant.fncs \
a190678e 49 fcdircache.fncs \
b219ac6b 50 fcfile.fncs \
bfc2dc3a 51 fcfontset.fncs \
caeea376 52 fcformat.fncs \
b219ac6b
KP
53 fcfreetype.fncs \
54 fcinit.fncs \
a190678e 55 fclangset.fncs \
b219ac6b 56 fcmatrix.fncs \
bfc2dc3a
KP
57 fcobjectset.fncs \
58 fcobjecttype.fncs \
b219ac6b
KP
59 fcpattern.fncs \
60 fcstring.fncs \
39381776 61 fcstrset.fncs \
b219ac6b 62 fcvalue.fncs
34cd0514 63
22671e25 64DOC_FUNCS_SGML=\
b219ac6b
KP
65 fcatomic.sgml \
66 fcblanks.sgml \
9bfb41ff 67 fccache.sgml \
22671e25 68 fccharset.sgml \
b219ac6b
KP
69 fcconfig.sgml \
70 fcconstant.sgml \
9bfb41ff 71 fcdircache.sgml \
b219ac6b 72 fcfile.sgml \
bfc2dc3a 73 fcfontset.sgml \
caeea376 74 fcformat.sgml \
b219ac6b
KP
75 fcfreetype.sgml \
76 fcinit.sgml \
9bfb41ff 77 fclangset.sgml \
b219ac6b 78 fcmatrix.sgml \
bfc2dc3a
KP
79 fcobjectset.sgml \
80 fcobjecttype.sgml \
b219ac6b
KP
81 fcpattern.sgml \
82 fcstring.sgml \
39381776 83 fcstrset.sgml \
b219ac6b
KP
84 fcvalue.sgml
85
dc2e06ab
KP
86man5_MANS=fonts-conf.5
87man3_MANS=$(DOCMAN3)
22671e25
KP
88
89noinst_PROGRAMS=edit-sgml
90edit_sgml_SOURCES=edit-sgml.c
91
0c009d2b 92DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
dc2e06ab 93LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/*
bdc0fd54 94
9a54f8a1
KP
95check_SCRIPTS=check-missing-doc
96TESTS_ENVIRONMENT=top_srcdir=${top_srcdir} sh
97TESTS=check-missing-doc
98
99EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(check_SCRIPTS) func.sgml confdir.sgml.in
34cd0514 100
22671e25 101SUFFIXES=.fncs .sgml .txt .html
0da305f7 102
2b45ef3a 103if USEDOCBOOK
bdc0fd54 104
22671e25 105.fncs.sgml:
0da305f7 106 $(RM) $@
d8ae9c92 107 ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
0da305f7
KP
108
109.sgml.txt:
110 $(RM) $@
394b2bf0 111 $(DOC2TXT) $<
0da305f7 112
0c009d2b
KP
113.sgml.pdf:
114 $(RM) $@
115 $(DOC2PDF) $<
116
dc2e06ab 117$(man3_MANS): func.refs
9238fc06 118
4cbc3ee8 119func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
b219ac6b 120 $(RM) func.refs
ed7955a5
KP
121 $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
122 mv devel-man/manpage.refs func.refs && \
123 mv devel-man/*.3 . && \
98d765a5 124 $(RM) devel-man/manpage.* && \
ed7955a5 125 rmdir devel-man
22671e25 126
4cbc3ee8
KP
127local-fontconfig-devel.sgml: fontconfig-devel.sgml
128 $(LN_S) $< $@
129
d8ae9c92 130$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
22671e25 131
4cbc3ee8
KP
132fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
133 $(RM) $@
89d6119c 134 $(DOC2MAN) local-fontconfig-user.sgml && \
98d765a5 135 $(RM) manpage.*
4cbc3ee8
KP
136
137local-fontconfig-user.sgml: fontconfig-user.sgml
138 $(LN_S) $< $@
b219ac6b 139
4484582e 140all-local: $(LOCAL_DOCS)
22671e25 141
4484582e 142clean-local:
dc2e06ab 143 $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
4cbc3ee8 144 $(RM) -r $(HTML_DIR)
22671e25 145
4cbc3ee8
KP
146$(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
147 $(RM) -r $(HTML_DIR)
6ca36812 148 $(DOC2HTML) -V '%use-id-as-filename%' -o $(HTML_DIR) local-fontconfig-devel.sgml
394b2bf0 149
dc2e06ab 150fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
4cbc3ee8
KP
151 $(RM) $@
152 $(DOC2TXT) local-fontconfig-devel.sgml
153 mv local-fontconfig-devel.txt $@
394b2bf0 154
dc2e06ab 155fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
0c009d2b 156 $(RM) $@
2cae0512 157 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
af2ad236
PL
158 || echo Failed to generate $@ >&2; \
159 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
0c009d2b 160
4cbc3ee8
KP
161fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
162 $(RM) $@ local-$@ $@.tmp
163 $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
164 -test -f local-$@ && mv local-$@ $@
165 -test -f $@ || mv $@.tmp $@
408dd9c0 166 -test -f $@.tmp && $(RM) $@.tmp
394b2bf0 167
4cbc3ee8
KP
168fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
169 $(RM) $@
170 $(DOC2TXT) local-fontconfig-user.sgml
171 mv local-fontconfig-user.txt $@
4b4f42ab 172
0c009d2b
KP
173fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
174 $(RM) $@
2cae0512 175 $(top_srcdir)/missing --run $(DOC2PDF) $< && mv local-$@ $@ \
af2ad236
PL
176 || echo Failed to generate $@ >&2; \
177 (test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
0c009d2b 178
f946755c 179STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
394b2bf0
KP
180confdir.sgml: ${DOC_SRC}/confdir.sgml.in
181 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
182
4cbc3ee8 183CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
4b4f42ab 184
2cae0512
PB
185htmldoc_DATA = $(HTML_DIR)/*
186
187$(HTML_DIR)/*: $(HTML_DIR)
188
bdc0fd54 189else
2cae0512
PB
190
191htmldoc_DATA = $(srcdir)/$(HTML_DIR)/*
192
bdc0fd54
KP
193all-local:
194clean-local:
195endif
196
4cbc3ee8
KP
197htmldocdir=$(docdir)/$(HTML_DIR)
198
199doc_DATA = $(DOC_FILES)
200