blob: 0cc0a50f93e05be4a1d68be3652264eb98887d8c [file] [log] [blame]
Daniel Veillard1164e751999-02-16 16:29:17 +00001## Process this file with automake to produce Makefile.in
Daniel Richard G6842ee82012-08-17 09:58:38 +08002SUBDIRS = . devhelp examples
Daniel Veillard1164e751999-02-16 16:29:17 +00003
4# The top-level SGML file.
Daniel Veillardd4330462003-04-29 12:40:16 +00005DOC_MAIN_XML_FILE=gnome-xml.xml
Daniel Veillard1164e751999-02-16 16:29:17 +00006
7# The directory containing the source code (if it contains documentation).
8DOC_SOURCE_DIR=..
9
William M. Brack476cd962003-08-13 11:09:42 +000010# A file in win32 depends upon one of the doc files
11WIN32_DIR=$(top_srcdir)/win32
12
Daniel Veillardc9484202001-10-24 12:35:52 +000013PAGES= architecture.html bugs.html contribs.html docs.html DOM.html \
14 downloads.html entities.html example.html help.html index.html \
15 interface.html intro.html library.html namespaces.html news.html \
Daniel Veillard7b602b42002-01-08 13:26:00 +000016 tree.html xmldtd.html XMLinfo.html XSLT.html
Daniel Veillard3bf65be2002-01-23 12:36:34 +000017APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
Daniel Veillardf8592562002-01-23 17:58:17 +000018 APIsymbols.html APIchunk0.html
Daniel Veillardf9c4cad2002-11-22 15:57:07 +000019
Daniel Richard G5706b6d2012-08-06 11:32:54 +080020if REBUILD_DOCS
21EXTRA_DIST_wc = xmlcatalog_man.xml $(wildcard tutorial/*.html) \
22 $(wildcard tutorial/*.c) $(wildcard tutorial/*.pdf) \
23 $(wildcard tutorial/images/*.png) \
24 $(wildcard tutorial/images/callouts/*.png) $(wildcard API*.html) \
25 $(wildcard *.1) $(wildcard *.xsl) $(wildcard *.html) \
26 $(wildcard *.gif) w3c.png $(wildcard html/*.html) \
27 $(wildcard html/*.png) libxml2-api.xml index.py search.php \
28 apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \
29 README.docs symbols.xml
30endif
31
32# Expanded form of EXTRA_DIST_wc
33#
34EXTRA_DIST = \
35 APIchunk0.html \
36 APIchunk1.html \
37 APIchunk2.html \
38 APIchunk3.html \
39 APIchunk4.html \
40 APIchunk5.html \
41 APIchunk6.html \
42 APIchunk7.html \
43 APIchunk8.html \
44 APIchunk9.html \
45 APIchunk10.html \
46 APIchunk11.html \
47 APIchunk12.html \
48 APIchunk13.html \
49 APIchunk14.html \
50 APIchunk15.html \
51 APIchunk16.html \
52 APIchunk17.html \
53 APIchunk18.html \
54 APIchunk19.html \
55 APIchunk20.html \
56 APIchunk21.html \
57 APIchunk22.html \
58 APIchunk23.html \
59 APIchunk24.html \
60 APIchunk25.html \
61 APIchunk26.html \
62 APIchunk27.html \
63 APIchunk28.html \
64 APIchunk29.html \
65 APIconstructors.html \
66 APIfiles.html \
67 APIfunctions.html \
68 APIsymbols.html \
69 ChangeLog.xsl \
70 DOM.gif \
71 DOM.html \
72 FAQ.html \
73 Libxml2-Logo-180x168.gif \
74 Libxml2-Logo-90x34.gif \
75 README.docs \
76 XMLinfo.html \
77 XSLT.html \
78 api.xsl \
79 apibuild.py \
80 architecture.html \
81 bugs.html \
82 catalog.gif \
83 catalog.html \
84 checkapisym.xsl \
85 contribs.html \
86 docs.html \
87 downloads.html \
88 elfgcchack.xsl \
89 encoding.html \
90 entities.html \
91 example.html \
92 guidelines.html \
93 help.html \
94 html/book1.html \
95 html/home.png \
96 html/index.html \
97 html/left.png \
98 html/libxml-DOCBparser.html \
99 html/libxml-HTMLparser.html \
100 html/libxml-HTMLtree.html \
101 html/libxml-SAX.html \
102 html/libxml-SAX2.html \
103 html/libxml-c14n.html \
104 html/libxml-catalog.html \
105 html/libxml-chvalid.html \
106 html/libxml-debugXML.html \
107 html/libxml-dict.html \
108 html/libxml-encoding.html \
109 html/libxml-entities.html \
110 html/libxml-globals.html \
111 html/libxml-hash.html \
112 html/libxml-lib.html \
113 html/libxml-list.html \
114 html/libxml-nanoftp.html \
115 html/libxml-nanohttp.html \
116 html/libxml-parser.html \
117 html/libxml-parserInternals.html \
118 html/libxml-pattern.html \
119 html/libxml-relaxng.html \
120 html/libxml-schemasInternals.html \
121 html/libxml-schematron.html \
122 html/libxml-threads.html \
123 html/libxml-tree.html \
124 html/libxml-uri.html \
125 html/libxml-valid.html \
126 html/libxml-xinclude.html \
127 html/libxml-xlink.html \
128 html/libxml-xmlIO.html \
129 html/libxml-xmlautomata.html \
130 html/libxml-xmlerror.html \
131 html/libxml-xmlexports.html \
132 html/libxml-xmlmemory.html \
133 html/libxml-xmlmodule.html \
134 html/libxml-xmlreader.html \
135 html/libxml-xmlregexp.html \
136 html/libxml-xmlsave.html \
137 html/libxml-xmlschemas.html \
138 html/libxml-xmlschemastypes.html \
139 html/libxml-xmlstring.html \
140 html/libxml-xmlunicode.html \
141 html/libxml-xmlversion.html \
142 html/libxml-xmlwriter.html \
143 html/libxml-xpath.html \
144 html/libxml-xpathInternals.html \
145 html/libxml-xpointer.html \
Roumen Petrov4d7a3292012-11-23 23:30:49 +0200146 html/libxml-xzlib.html \
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800147 html/right.png \
148 html/up.png \
149 index.html \
150 index.py \
151 interface.html \
152 intro.html \
153 library.html \
154 libxml.gif \
155 libxml2-api.xml \
156 libxml2.xsa \
157 namespaces.html \
158 newapi.xsl \
159 news.html \
160 news.xsl \
161 python.html \
162 redhat.gif \
163 search.php \
164 searches.html \
165 searches.xsl \
166 site.xsl \
167 smallfootonly.gif \
168 structure.gif \
169 symbols.xml \
170 syms.xsl \
171 threads.html \
172 tree.html \
173 tutorial/apa.html \
174 tutorial/apb.html \
175 tutorial/apc.html \
176 tutorial/apd.html \
177 tutorial/ape.html \
178 tutorial/apf.html \
179 tutorial/apg.html \
180 tutorial/aph.html \
181 tutorial/api.html \
182 tutorial/ar01s02.html \
183 tutorial/ar01s03.html \
184 tutorial/ar01s04.html \
185 tutorial/ar01s05.html \
186 tutorial/ar01s06.html \
187 tutorial/ar01s07.html \
188 tutorial/ar01s08.html \
189 tutorial/ar01s09.html \
190 tutorial/images/blank.png \
191 tutorial/images/callouts/1.png \
192 tutorial/images/callouts/10.png \
193 tutorial/images/callouts/2.png \
194 tutorial/images/callouts/3.png \
195 tutorial/images/callouts/4.png \
196 tutorial/images/callouts/5.png \
197 tutorial/images/callouts/6.png \
198 tutorial/images/callouts/7.png \
199 tutorial/images/callouts/8.png \
200 tutorial/images/callouts/9.png \
201 tutorial/images/caution.png \
202 tutorial/images/draft.png \
203 tutorial/images/home.png \
204 tutorial/images/important.png \
205 tutorial/images/next.png \
206 tutorial/images/note.png \
207 tutorial/images/prev.png \
208 tutorial/images/tip.png \
209 tutorial/images/toc-blank.png \
210 tutorial/images/toc-minus.png \
211 tutorial/images/toc-plus.png \
212 tutorial/images/up.png \
213 tutorial/images/warning.png \
214 tutorial/includeaddattribute.c \
215 tutorial/includeaddkeyword.c \
216 tutorial/includeconvert.c \
217 tutorial/includegetattribute.c \
218 tutorial/includekeyword.c \
219 tutorial/includexpath.c \
220 tutorial/index.html \
221 tutorial/ix01.html \
222 tutorial/xmltutorial.pdf \
223 upgrade.html \
224 w3c.png \
225 wiki.xsl \
226 xml.html \
227 xmlcatalog.1 \
228 xmlcatalog_man.html \
229 xmlcatalog_man.xml \
230 xmldtd.html \
231 xmlio.html \
232 xmllint.1 \
233 xmllint.html \
234 xmllint.xml \
235 xmlmem.html \
236 xmlreader.html \
237 xsa.xsl
Daniel Veillard1164e751999-02-16 16:29:17 +0000238
Daniel Veillard52dcab32001-10-30 12:51:17 +0000239man_MANS = xmllint.1 xmlcatalog.1
Daniel Veillard98fed372001-09-13 11:34:58 +0000240
Daniel Veillardb40744e2008-10-17 13:26:44 +0000241if REBUILD_DOCS
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800242docs: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
Daniel Veillardc9484202001-10-24 12:35:52 +0000243
Daniel Veillard9a15b302009-08-07 16:27:15 +0200244api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl
Daniel Veillard1d913862003-11-21 00:28:39 +0000245
246web: $(PAGES)
Daniel Veillard3bf65be2002-01-23 12:36:34 +0000247
Daniel Veillarda2351322004-06-27 12:08:10 +0000248../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml
Daniel Veillard06500c82004-09-07 09:12:44 +0000249 -@(if [ -x $(XSLTPROC) ] ; then \
Daniel Veillarda2351322004-06-27 12:08:10 +0000250 echo "Rebuilding the elfgcchack.h header" ; \
Daniel Veillard06500c82004-09-07 09:12:44 +0000251 $(XSLTPROC) --nonet $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml > elfgcchack.h ; \
Daniel Veillarda2351322004-06-27 12:08:10 +0000252 if [ "`diff -q elfgcchack.h ../elfgcchack.h`" ] ; then \
Daniel Veillard01fa6152004-06-29 17:04:39 +0000253 echo "updating ../elfgcchack.h"; \
Daniel Veillarda2351322004-06-27 12:08:10 +0000254 cp elfgcchack.h ../elfgcchack.h; \
255 fi ; rm -f elfgcchack.h ; fi );
256
Daniel Veillarddde64082011-03-23 08:12:26 +0800257$(PAGES): xml.html $(srcdir)/site.xsl
Daniel Veillard06500c82004-09-07 09:12:44 +0000258 -@(if [ -x $(XSLTPROC) ] ; then \
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000259 echo "Rebuilding the HTML Web pages from xml.html" ; \
Daniel Richard G6842ee82012-08-17 09:58:38 +0800260 $(XSLTPROC) --nonet --html --path $(srcdir) $(srcdir)/site.xsl $(srcdir)/xml.html > index.html ; fi );
Daniel Veillard06500c82004-09-07 09:12:44 +0000261 -@(if [ -x $(XMLLINT) ] ; then \
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000262 echo "Validating the HTML Web pages" ; \
Daniel Veillard06500c82004-09-07 09:12:44 +0000263 $(XMLLINT) --nonet --valid --noout $(PAGES) ; fi );
Daniel Veillard55a99271999-02-25 11:01:29 +0000264
Daniel Richard G6842ee82012-08-17 09:58:38 +0800265$(top_builddir)/NEWS: $(srcdir)/news.xsl $(srcdir)/news.html
Daniel Veillard06500c82004-09-07 09:12:44 +0000266 -@(if [ -x $(XSLTPROC) ] ; then \
Daniel Richard G6842ee82012-08-17 09:58:38 +0800267 $(XSLTPROC) --nonet $(srcdir)/news.xsl $(srcdir)/news.html > $(top_builddir)/NEWS ; fi );
Daniel Veillard8ba17412003-01-01 19:13:12 +0000268
Daniel Richard G6842ee82012-08-17 09:58:38 +0800269libxml2.xsa: $(srcdir)/xsa.xsl $(srcdir)/news.html
Daniel Veillard06500c82004-09-07 09:12:44 +0000270 -@(if [ -x $(XSLTPROC) ] ; then \
Daniel Veillardeebd6332004-08-26 10:30:44 +0000271 echo "Rebuilding the NEWS file" ; \
Daniel Richard G6842ee82012-08-17 09:58:38 +0800272 $(XSLTPROC) --nonet $(srcdir)/xsa.xsl $(srcdir)/news.html > libxml2.xsa ; fi );
Daniel Veillardb4d30b62003-03-16 22:32:36 +0000273
Daniel Richard G6842ee82012-08-17 09:58:38 +0800274$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(srcdir)/site.xsl $(srcdir)/api.xsl
Daniel Veillard06500c82004-09-07 09:12:44 +0000275 -@(if [ -x $(XSLTPROC) ] ; then \
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000276 echo "Rebuilding the HTML API pages from libxml2-refs.xml" ; \
Daniel Richard G6842ee82012-08-17 09:58:38 +0800277 $(XSLTPROC) --nonet --html $(srcdir)/api.xsl \
278 $(srcdir)/xml.html ; fi );
Daniel Veillard06500c82004-09-07 09:12:44 +0000279 -@(if [ -x $(XMLLINT) ] ; then \
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000280 echo "Validating the HTML API pages" ; \
Daniel Veillard06500c82004-09-07 09:12:44 +0000281 $(XMLLINT) --nonet --valid --noout API*.html ; fi );
Daniel Veillard3bf65be2002-01-23 12:36:34 +0000282
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000283$(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl
Daniel Veillard06500c82004-09-07 09:12:44 +0000284 -@(if [ -x $(XSLTPROC) ] ; then \
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000285 echo "Rebuilding the HTML pages from the XML API" ; \
Daniel Richard G6842ee82012-08-17 09:58:38 +0800286 $(XSLTPROC) --nonet $(srcdir)/newapi.xsl $(srcdir)/libxml2-api.xml ; fi )
Daniel Veillard06500c82004-09-07 09:12:44 +0000287 -@(if [ -x $(XMLLINT) ] ; then \
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000288 echo "Validating the resulting XHTML pages" ; \
Daniel Veillard06500c82004-09-07 09:12:44 +0000289 $(XMLLINT) --nonet --valid --noout html/*.html ; fi );
Daniel Veillard817e70b2002-11-19 22:28:48 +0000290
Daniel Veillarde92bf5d2005-02-04 17:28:19 +0000291wiki: libxml2-api.xml $(srcdir)/wiki.xsl
292 -@(if [ -x $(XSLTPROC) ] ; then \
293 echo "Rebuilding the wiki HTML pages from the XML API" ; \
Daniel Richard G6842ee82012-08-17 09:58:38 +0800294 $(XSLTPROC) --nonet $(srcdir)/wiki.xsl $(srcdir)/libxml2-api.xml; fi )
Daniel Veillarde92bf5d2005-02-04 17:28:19 +0000295
William M. Brack7a821652003-08-15 07:27:40 +0000296$(WIN32_DIR)/libxml2.def.src: libxml2-api.xml
Daniel Veillard06500c82004-09-07 09:12:44 +0000297 -@(if [ -x $(XSLTPROC) ] ; then \
298 $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \
William M. Brack476cd962003-08-13 11:09:42 +0000299 --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi )
300
Daniel Richard G6842ee82012-08-17 09:58:38 +0800301source_file_deps = \
302 $(filter-out %/xmlversion.h, $(wildcard $(top_srcdir)/include/libxml/*.h)) \
303 $(top_srcdir)/include/libxml/xmlversion.h.in \
304 $(wildcard $(top_srcdir)/*.c)
305
306libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl $(source_file_deps)
Daniel Richard878ec9d2012-09-07 14:52:17 +0800307 test -f $(top_srcdir)/include/libxml/xmlversion.h
Daniel Richard G6842ee82012-08-17 09:58:38 +0800308 (cd $(srcdir) && ./apibuild.py)
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800309 ($(XSLTPROC) $(srcdir)/checkapisym.xsl $(srcdir)/libxml2-api.xml)
310 ($(XSLTPROC) -o ../libxml2.syms $(srcdir)/syms.xsl $(srcdir)/symbols.xml)
Daniel Veillard2ae13382005-01-25 23:45:06 +0000311 -@(cd .. ; $(MAKE) rebuild_testapi)
312
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000313
314xmllint.1: xmllint.xml
Daniel Veillard06500c82004-09-07 09:12:44 +0000315 -@($(XSLTPROC) --nonet xmllint.xml)
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000316
317xmlcatalog.1: xmlcatalog_man.xml
Daniel Veillard06500c82004-09-07 09:12:44 +0000318 -@($(XSLTPROC) --nonet xmlcatalog_man.xml)
Daniel Veillard61006472002-01-21 17:31:47 +0000319
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800320check-extra-dist:
321 for f in $(EXTRA_DIST_wc) ; do echo $$f; done | sort -u >tmp.EXTRA_DIST_wc
322 for f in $(EXTRA_DIST) ; do echo $$f; done | sort >tmp.EXTRA_DIST
323 diff -u tmp.EXTRA_DIST_wc tmp.EXTRA_DIST
324 rm -f tmp.EXTRA_DIST_wc tmp.EXTRA_DIST
325endif
326
Daniel Veillard1164e751999-02-16 16:29:17 +0000327clean-local:
328 rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
329
William M. Brack5a9c1fd2004-12-17 21:38:09 +0000330maintainer-clean-local: clean-local
Daniel Veillard93d95252003-04-29 20:25:40 +0000331 rm -rf libxml-decl-list.txt libxml-decl.txt
Daniel Veillard1164e751999-02-16 16:29:17 +0000332
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800333rebuild: api docs
Daniel Veillard1e346af1999-02-22 10:33:01 +0000334
Daniel Veillard55a99271999-02-25 11:01:29 +0000335install-data-local:
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800336 $(MKDIR_P) $(DESTDIR)$(HTML_DIR)
337 -$(INSTALL) -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
338 $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/html
339 -$(INSTALL) -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
340 -$(INSTALL) -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
341 $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial
342 -$(INSTALL) -m 0644 $(srcdir)/tutorial/*.* \
Daniel Veillardfc979062004-03-04 22:07:16 +0000343 $(DESTDIR)$(HTML_DIR)/tutorial
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800344 $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images
345 -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/*.* \
Daniel Veillardfc979062004-03-04 22:07:16 +0000346 $(DESTDIR)$(HTML_DIR)/tutorial/images
Daniel Richard G5706b6d2012-08-06 11:32:54 +0800347 $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
348 -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/callouts/*.* \
Daniel Veillardfc979062004-03-04 22:07:16 +0000349 $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
Daniel Veillard55a99271999-02-25 11:01:29 +0000350
Daniel Richard878ec9d2012-09-07 14:52:17 +0800351.PHONY: docs api web wiki rebuild