Upload tizen 2.0 beta source
[framework/graphics/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         $(DOC_FUNCS_SGML)       \
30         $(HTML_DIR)/*           \
31         $(SGML_FILES)           \
32         $(check_SCRIPTS)        \
33         confdir.sgml.in         \
34         func.sgml               \
35         $(NULL)
36 MAINTAINERCLEANFILES =          \
37         $(DOC_FUNCS_SGML)       \
38         $(NULL)
39 CLEANFILES =                    \
40         $(BUILT_DOCS)           \
41         $(LOCAL_SGML_FILES)     \
42         confdir.sgml            \
43         func.refs               \
44         $(NULL)
45 BUILT_SOURCES =                 \
46         $(NULL)
47 SUFFIXES =      \
48         .fncs   \
49         .sgml   \
50         .txt    \
51         .html   \
52         $(NULL)
53 TESTS =                         \
54         check-missing-doc       \
55         $(NULL)
56 TESTS_ENVIRONMENT=top_srcdir=${top_srcdir} sh
57 #
58 DOC2HTML = docbook2html
59 DOC2TXT  = docbook2txt
60 DOC2MAN  = docbook2man
61 DOC2PDF  = docbook2pdf
62
63 DOC_FUNCS_FNCS =                \
64         fcatomic.fncs           \
65         fcblanks.fncs           \
66         fccache.fncs            \
67         fccharset.fncs          \
68         fcconfig.fncs           \
69         fcconstant.fncs         \
70         fcdircache.fncs         \
71         fcfile.fncs             \
72         fcfontset.fncs          \
73         fcformat.fncs           \
74         fcfreetype.fncs         \
75         fcinit.fncs             \
76         fclangset.fncs          \
77         fcmatrix.fncs           \
78         fcobjectset.fncs        \
79         fcobjecttype.fncs       \
80         fcpattern.fncs          \
81         fcstring.fncs           \
82         fcstrset.fncs           \
83         fcvalue.fncs            \
84         $(NULL)
85 SGML_FILES =                            \
86         $(srcdir)/fontconfig-user.sgml  \
87         $(srcdir)/fontconfig-devel.sgml \
88         $(NULL)
89 LOCAL_SGML_FILES =                      \
90         local-fontconfig-user.sgml      \
91         local-fontconfig-devel.sgml     \
92         $(NULL)
93
94 DOC_FUNCS_SGML = $(DOC_FUNCS_FNCS:.fncs=.sgml)
95 BUILT_DOCS =            \
96         $(HTML_FILES)   \
97         $(PDF_FILES)    \
98         $(TXT_FILES)    \
99         $(man3_MANS)    \
100         $(man5_MANS)    \
101         $(NULL)
102 DOCS_DEPS =                     \
103         $(DOC_FUNCS_SGML)       \
104         confdir.sgml            \
105         version.sgml            \
106         $(NULL)
107
108 TXT_FILES = $(SGML_FILES:.sgml=.txt)
109 PDF_FILES = $(SGML_FILES:.sgml=.pdf)
110 HTML_FILES =                    \
111         fontconfig-user.html    \
112         $(NULL)
113 HTML_DIR = fontconfig-devel
114 #
115 noinst_PROGRAMS =       \
116         $(NULL)
117 ##
118 edit_sgml_SOURCES =     \
119         edit-sgml.c     \
120         $(NULL)
121 #
122 check_SCRIPTS =                 \
123         check-missing-doc       \
124         $(NULL)
125 #
126 man3_MANS =             \
127         $(DOCMAN3)      \
128         $(NULL)
129 man5_MANS =             \
130         fonts-conf.5    \
131         $(NULL)
132 #
133 doc_DATA =              \
134         $(TXT_FILES)    \
135         $(PDF_FILES)    \
136         $(HTML_FILES)   \
137         $(NULL)
138 #
139 htmldocdir = $(docdir)/$(HTML_DIR)
140 htmldoc_DATA =          \
141         $(NULL)
142
143 if USEDOCBOOK
144 BUILT_SOURCES +=                \
145         $(LOCAL_SGML_FILES)     \
146         $(NULL)
147 noinst_PROGRAMS +=      \
148         edit-sgml       \
149         $(NULL)
150 htmldoc_DATA += $(HTML_DIR)/*
151
152 ##
153 if CROSS_COMPILING
154 .fncs.sgml:
155         @echo Warning: cannot rebuild $@ when cross-compiling
156 else
157 .fncs.sgml: edit-sgml$(EXEEXT) $(srcdir)/func.sgml
158         -@rm $@
159         $(AM_V_GEN) $(builddir)/edit-sgml$(EXEEXT) $(srcdir)/func.sgml < '$*.fncs' > $*.sgml
160 endif
161 .sgml.txt: $(DOCS_DEPS)
162         -@rm $@
163         $(AM_V_GEN) $(DOC2TXT) $*.sgml
164 .sgml.pdf: $(DOCS_DEPS)
165         -@rm $@
166         $(AM_V_GEN) $(DOC2PDF) $*.sgml
167 .sgml.html: $(DOCS_DEPS)
168         -@rm $@
169         $(AM_V_GEN) $(DOC2HTML) -u $*.sgml > $@
170 ##
171 fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
172         -@rm $@
173         $(AM_V_GEN) $(DOC2MAN) local-fontconfig-user.sgml && \
174         rm manpage.*
175 ##
176 $(man3_MANS): func.refs
177 func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS)
178         -@rm $@
179         [ "x$(builddir)" != "x$(srcdir)" ] &&           \
180         for f in $(DOC_FUNCS_SGML); do                  \
181                 rm -f $(builddir)/$$f || :;             \
182                 $(LN_S) $(srcdir)/$$f $(builddir)/$$f;  \
183         done || :
184         $(AM_V_GEN) $(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
185         mv devel-man/manpage.refs func.refs &&  \
186         mv devel-man/*.3 . &&                   \
187         rm devel-man/manpage.* &&               \
188         rmdir devel-man
189 confdir.sgml: $(srcdir)/confdir.sgml.in
190         $(AM_V_GEN) sed -e 's,@CONFDIR\@,${CONFDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@
191 ##
192 $(HTML_DIR)/*: $(HTML_DIR)
193 $(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
194         -@rm -r $@
195         $(AM_V_GEN) $(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml
196 local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml
197         $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@
198 local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
199         $(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@
200 #
201 all-local: $(BUILT_DOCS) $(HTML_DIR)/*
202 clean-local:
203         -rm -r $(HTML_DIR) devel-man
204 else
205 htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*
206 all-local:
207 clean-local:
208 endif