Add uuid in configure file
[platform/upstream/fontconfig.git] / doc / Makefile.am
1 # -*- encoding: utf-8 -*-
2 #
3 # fontconfig/doc/Makefile.am
4 #
5 # Copyright © 2003 Keith Packard
6 #
7 # Permission to use, copy, modify, distribute, and sell this software and its
8 # documentation for any purpose is hereby granted without fee, provided that
9 # the above copyright notice appear in all copies and that both that
10 # copyright notice and this permission notice appear in supporting
11 # documentation, and that the name of the author(s) not be used in
12 # advertising or publicity pertaining to distribution of the software without
13 # specific, written prior permission.  The authors make no
14 # representations about the suitability of this software for any purpose.  It
15 # is provided "as is" without express or implied warranty.
16 #
17 # THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
18 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
19 # EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
20 # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21 # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23 # PERFORMANCE OF THIS SOFTWARE.
24
25 NULL =
26 EXTRA_DIST =                    \
27         $(BUILT_DOCS)           \
28         $(DOC_FUNCS_FNCS)       \
29         $(HTML_DIR)/*           \
30         $(SGML_FILES)           \
31         $(check_SCRIPTS)        \
32         confdir.sgml.in         \
33         func.sgml               \
34         $(NULL)
35 BUILT_SOURCES =                 \
36         $(DOC_FUNCS_SGML)       \
37         $(NULL)
38
39 if USEDOCBOOK
40 maintainerdoccleanfiles =       \
41         $(NULL)
42 cleandocfiles =                 \
43         $(BUILT_DOCS)           \
44         $(NULL)
45 else
46 maintainerdoccleanfiles =       \
47         $(BUILT_DOCS)           \
48         $(NULL)
49 cleandocfiles =                 \
50         $(NULL)
51 endif
52 MAINTAINERCLEANFILES =                  \
53         $(DOC_FUNCS_SGML)               \
54         $(maintainerdoccleanfiles)      \
55         $(NULL)
56 CLEANFILES =                    \
57         $(cleandocfiles)        \
58         $(LOCAL_SGML_FILES)     \
59         confdir.sgml            \
60         func.refs               \
61         $(NULL)
62 SUFFIXES =      \
63         .fncs   \
64         .sgml   \
65         .txt    \
66         .html   \
67         $(NULL)
68 TESTS =                         \
69         check-missing-doc       \
70         $(NULL)
71 TESTS_ENVIRONMENT = \
72         top_srcdir=${top_srcdir}; export top_srcdir; \
73         $(NULL)
74 LOG_COMPILER = sh
75 #
76 DOC2HTML = docbook2html
77 DOC2TXT  = docbook2txt
78 DOC2MAN  = docbook2man
79 DOC2PDF  = docbook2pdf
80
81 DOC_FUNCS_FNCS =                \
82         fcatomic.fncs           \
83         fcblanks.fncs           \
84         fccache.fncs            \
85         fccharset.fncs          \
86         fcconfig.fncs           \
87         fcconstant.fncs         \
88         fcdircache.fncs         \
89         fcfile.fncs             \
90         fcfontset.fncs          \
91         fcformat.fncs           \
92         fcfreetype.fncs         \
93         fcinit.fncs             \
94         fclangset.fncs          \
95         fcmatrix.fncs           \
96         fcobjectset.fncs        \
97         fcobjecttype.fncs       \
98         fcpattern.fncs          \
99         fcrange.fncs            \
100         fcstring.fncs           \
101         fcstrset.fncs           \
102         fcvalue.fncs            \
103         fcweight.fncs           \
104         $(NULL)
105 SGML_FILES =                    \
106         fontconfig-user.sgml    \
107         fontconfig-devel.sgml   \
108         $(NULL)
109 LOCAL_SGML_FILES =                      \
110         local-fontconfig-user.sgml      \
111         local-fontconfig-devel.sgml     \
112         $(NULL)
113
114 DOC_FUNCS_SGML = $(DOC_FUNCS_FNCS:.fncs=.sgml)
115 BUILT_DOCS =            \
116         $(HTML_FILES)   \
117         $(PDF_FILES)    \
118         $(TXT_FILES)    \
119         $(man3_MANS)    \
120         $(man5_MANS)    \
121         $(NULL)
122 DOCS_DEPS =                     \
123         $(DOC_FUNCS_SGML)       \
124         confdir.sgml            \
125         version.sgml            \
126         $(NULL)
127
128 TXT_FILES = $(SGML_FILES:.sgml=.txt)
129 PDF_FILES = $(SGML_FILES:.sgml=.pdf)
130 HTML_FILES =                    \
131         fontconfig-user.html    \
132         $(NULL)
133 HTML_DIR = fontconfig-devel
134 #
135 noinst_PROGRAMS =       \
136         $(NULL)
137 noinst_SCRIPTS =                \
138         edit-sgml.py            \
139         $(NULL)
140 ##
141 check_SCRIPTS =                 \
142         check-missing-doc       \
143         $(NULL)
144 #
145 man3_MANS =             \
146         $(DOCMAN3)      \
147         $(NULL)
148 man5_MANS =             \
149         fonts-conf.5    \
150         $(NULL)
151 #
152 doc_DATA =              \
153         $(TXT_FILES)    \
154         $(PDF_FILES)    \
155         $(HTML_FILES)   \
156         $(NULL)
157 #
158 htmldocdir = $(docdir)/$(HTML_DIR)
159 htmldoc_DATA =          \
160         $(NULL)
161
162 if USEDOCBOOK
163 BUILT_SOURCES +=                \
164         $(LOCAL_SGML_FILES)     \
165         $(NULL)
166 htmldoc_DATA += $(HTML_DIR)/*
167
168 ##
169 .fncs.sgml:
170         $(AM_V_GEN) $(RM) $@; \
171         $(PYTHON) $(srcdir)/edit-sgml.py $(srcdir)/func.sgml '$(srcdir)/$*.fncs' $*.sgml
172 .sgml.txt:
173         $(AM_V_GEN) $(RM) $@; \
174         $(DOC2TXT) $*.sgml
175 .sgml.pdf:
176         $(AM_V_GEN) $(RM) $@; \
177         $(DOC2PDF) $*.sgml
178 .sgml.html:
179         $(AM_V_GEN) $(RM) $@; \
180         $(DOC2HTML) -u $*.sgml > $@
181 ##
182 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
183         $(AM_V_GEN) $(RM) $@; \
184         $(DOC2MAN) local-fontconfig-user.sgml && \
185         $(RM) manpage.*
186 ##
187 $(man3_MANS): func.refs
188 func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS)
189         $(AM_V_GEN) $(RM) $@; \
190         $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
191         mv devel-man/manpage.refs func.refs &&  \
192         mv devel-man/*.3 . &&                   \
193         $(RM) devel-man/manpage.* &&            \
194         rmdir devel-man || rm $@ || :
195 confdir.sgml: $(srcdir)/confdir.sgml.in
196         $(AM_V_GEN) sed -e 's,@BASECONFIGDIR\@,${BASECONFIGDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@
197 ##
198 $(DOC_FUNCS_SGML): $(DOC_FUNCS_FNCS) $(srcdir)/edit-sgml.py $(srcdir)/func.sgml
199 $(TXT_FILES): $(DOCS_DEPS)
200 $(PDF_FILES): $(DOCS_DEPS)
201 $(HTML_FILES): $(DOCS_DEPS)
202 $(HTML_DIR)/*: $(HTML_DIR)
203 $(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
204         $(AM_V_GEN) $(RM) -r $@; \
205         $(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml
206 local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml
207         $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@;  \
208         [ ! -f $(builddir)/fontconfig-user.sgml ] && cp -a $(srcdir)/fontconfig-user.sgml $(builddir)/fontconfig-user.sgml || :
209 local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
210         $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@; \
211         [ ! -f $(builddir)/fontconfig-devel.sgml ] && cp -a $(srcdir)/fontconfig-devel.sgml $(builddir)/fontconfig-devel.sgml || :
212 #
213 all-local: $(BUILT_DOCS) $(HTML_DIR)/*
214 clean-local:
215         $(RM) -r $(HTML_DIR) devel-man
216         [ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || :
217 dist-local-check-docs-enabled:
218         @true
219 else
220 htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*
221 .fncs.sgml:
222         $(AM_V_GEN) $(RM) $@; \
223         touch -r $< $@
224 all-local:
225 clean-local:
226 dist-local-check-docs-enabled:
227         @echo "*** --enable-man must be used in order to make dist"
228         @false
229 endif
230
231 # force doc rebuild after configure
232 dist-hook-local: dist-local-check-docs-enabled
233
234 -include $(top_srcdir)/git.mk