1 | ## Process this file with automake to produce Makefile.in |
---|
2 | # AUTOMAKE_ OPTIONS=no-dependencies |
---|
3 | |
---|
4 | SUBDIRS = include . doc example @PYTHON_SUBDIR@ |
---|
5 | |
---|
6 | DIST_SUBDIRS = include . doc example python |
---|
7 | |
---|
8 | INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ |
---|
9 | |
---|
10 | noinst_PROGRAMS=testSchemas testSAX testHTML testXPath testURI testDocbook \ |
---|
11 | testThreads testC14N testAutomata testRegexp testReader |
---|
12 | |
---|
13 | bin_PROGRAMS = xmllint xmlcatalog |
---|
14 | |
---|
15 | bin_SCRIPTS=xml2-config |
---|
16 | |
---|
17 | lib_LTLIBRARIES = libxml2.la |
---|
18 | libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm |
---|
19 | |
---|
20 | libxml2_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@ |
---|
21 | |
---|
22 | if WITH_TRIO_SOURCES |
---|
23 | libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ |
---|
24 | parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ |
---|
25 | valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ |
---|
26 | xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ |
---|
27 | catalog.c globals.c threads.c c14n.c \ |
---|
28 | xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ |
---|
29 | triostr.c trio.c xmlreader.c |
---|
30 | else |
---|
31 | libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ |
---|
32 | parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ |
---|
33 | valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ |
---|
34 | xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \ |
---|
35 | catalog.c globals.c threads.c c14n.c \ |
---|
36 | xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ |
---|
37 | xmlreader.c |
---|
38 | endif |
---|
39 | |
---|
40 | DEPS = $(top_builddir)/libxml2.la |
---|
41 | LDADDS = $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm |
---|
42 | |
---|
43 | man_MANS = xml2-config.1 libxml.3 |
---|
44 | |
---|
45 | m4datadir = $(datadir)/aclocal |
---|
46 | m4data_DATA = libxml.m4 |
---|
47 | |
---|
48 | xmllint_SOURCES=xmllint.c |
---|
49 | xmllint_LDFLAGS = |
---|
50 | xmllint_DEPENDENCIES = $(DEPS) |
---|
51 | xmllint_LDADD= @RDL_LIBS@ $(LDADDS) |
---|
52 | |
---|
53 | testSAX_SOURCES=testSAX.c |
---|
54 | testSAX_LDFLAGS = |
---|
55 | testSAX_DEPENDENCIES = $(DEPS) |
---|
56 | testSAX_LDADD= $(LDADDS) |
---|
57 | |
---|
58 | testHTML_SOURCES=testHTML.c |
---|
59 | testHTML_LDFLAGS = |
---|
60 | testHTML_DEPENDENCIES = $(DEPS) |
---|
61 | testHTML_LDADD= $(LDADDS) |
---|
62 | |
---|
63 | testDocbook_SOURCES=testDocbook.c |
---|
64 | testDocbook_LDFLAGS = |
---|
65 | testDocbook_DEPENDENCIES = $(DEPS) |
---|
66 | testDocbook_LDADD= $(LDADDS) |
---|
67 | |
---|
68 | xmlcatalog_SOURCES=xmlcatalog.c |
---|
69 | xmlcatalog_LDFLAGS = |
---|
70 | xmlcatalog_DEPENDENCIES = $(DEPS) |
---|
71 | xmlcatalog_LDADD= @RDL_LIBS@ $(LDADDS) |
---|
72 | |
---|
73 | testXPath_SOURCES=testXPath.c |
---|
74 | testXPath_LDFLAGS = |
---|
75 | testXPath_DEPENDENCIES = $(DEPS) |
---|
76 | testXPath_LDADD= $(LDADDS) |
---|
77 | |
---|
78 | testC14N_SOURCES=testC14N.c |
---|
79 | testC14N_LDFLAGS = |
---|
80 | testC14N_DEPENDENCIES = $(DEPS) |
---|
81 | testC14N_LDADD= $(LDADDS) |
---|
82 | |
---|
83 | testThreads_SOURCES=testThreads.c |
---|
84 | testThreads_LDFLAGS = |
---|
85 | testThreads_DEPENDENCIES = $(DEPS) |
---|
86 | testThreads_LDADD= $(LDADDS) |
---|
87 | |
---|
88 | testURI_SOURCES=testURI.c |
---|
89 | testURI_LDFLAGS = |
---|
90 | testURI_DEPENDENCIES = $(DEPS) |
---|
91 | testURI_LDADD= $(LDADDS) |
---|
92 | |
---|
93 | testRegexp_SOURCES=testRegexp.c |
---|
94 | testRegexp_LDFLAGS = |
---|
95 | testRegexp_DEPENDENCIES = $(DEPS) |
---|
96 | testRegexp_LDADD= $(LDADDS) |
---|
97 | |
---|
98 | testAutomata_SOURCES=testAutomata.c |
---|
99 | testAutomata_LDFLAGS = |
---|
100 | testAutomata_DEPENDENCIES = $(DEPS) |
---|
101 | testAutomata_LDADD= $(LDADDS) |
---|
102 | |
---|
103 | testSchemas_SOURCES=testSchemas.c |
---|
104 | testSchemas_LDFLAGS = |
---|
105 | testSchemas_DEPENDENCIES = $(DEPS) |
---|
106 | testSchemas_LDADD= $(LDADDS) |
---|
107 | |
---|
108 | testReader_SOURCES=testReader.c |
---|
109 | testReader_LDFLAGS = |
---|
110 | testReader_DEPENDENCIES = $(DEPS) |
---|
111 | testReader_LDADD= $(LDADDS) |
---|
112 | |
---|
113 | check-local: tests |
---|
114 | |
---|
115 | testall : tests SVGtests SAXtests |
---|
116 | |
---|
117 | tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests C14Ntests Scripttests Catatests @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ |
---|
118 | @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; $(MAKE) tests ; fi) |
---|
119 | |
---|
120 | valgrind: |
---|
121 | @echo '## Running the regression tests under Valgrind' |
---|
122 | @echo '## Go get a cup of coffee it is gonna take a while ...' |
---|
123 | $(MAKE) CHECKER='valgrind -q' tests |
---|
124 | |
---|
125 | HTMLtests : testHTML$(EXEEXT) |
---|
126 | @(echo > .memdump) |
---|
127 | @echo "##" |
---|
128 | @echo "## HTML regression tests" |
---|
129 | @echo "##" |
---|
130 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
---|
131 | name=`basename $$i`; \ |
---|
132 | if [ ! -d $$i ] ; then \ |
---|
133 | if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ |
---|
134 | echo New test file $$name ; \ |
---|
135 | $(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \ |
---|
136 | else \ |
---|
137 | echo Testing $$name ; \ |
---|
138 | $(CHECKER) $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \ |
---|
139 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
140 | diff $(srcdir)/result/HTML/$$name result.$$name ; \ |
---|
141 | diff -b $(srcdir)/result/HTML/$$name.err error.$$name ; \ |
---|
142 | $(CHECKER) $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \ |
---|
143 | diff result.$$name result2.$$name ; \ |
---|
144 | rm result.$$name result2.$$name error.$$name ; \ |
---|
145 | fi ; fi ; done) |
---|
146 | @echo "##" |
---|
147 | @echo "## Push HTML regression tests" |
---|
148 | @echo "##" |
---|
149 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
---|
150 | name=`basename $$i`; \ |
---|
151 | if [ ! -d $$i ] ; then \ |
---|
152 | if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ |
---|
153 | echo New test file $$name ; \ |
---|
154 | $(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \ |
---|
155 | else \ |
---|
156 | echo Testing $$name ; \ |
---|
157 | $(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \ |
---|
158 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
159 | diff $(srcdir)/result/HTML/$$name result.$$name ; \ |
---|
160 | cut -b 1-15 $(srcdir)/result/HTML/$$name.err > errorcut.$$name; \ |
---|
161 | cut -b 1-15 error.$$name > errorcut2.$$name; \ |
---|
162 | diff -b errorcut.$$name errorcut2.$$name ; \ |
---|
163 | $(CHECKER) $(top_builddir)/testHTML --push result.$$name > result2.$$name 2>error.$$name ; \ |
---|
164 | diff result.$$name result2.$$name ; \ |
---|
165 | rm result.$$name result2.$$name error.$$name errorcut.$$name errorcut2.$$name ; \ |
---|
166 | fi ; fi ; done) |
---|
167 | @echo "##" |
---|
168 | @echo "## HTML SAX regression tests" |
---|
169 | @echo "##" |
---|
170 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
---|
171 | name=`basename $$i`; \ |
---|
172 | if [ ! -d $$i ] ; then \ |
---|
173 | if [ ! -f $(srcdir)/result/HTML/$$name.sax ] ; then \ |
---|
174 | echo New test file $$name ; \ |
---|
175 | $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \ |
---|
176 | else \ |
---|
177 | echo Testing $$name ; \ |
---|
178 | $(CHECKER) $(top_builddir)/testHTML --sax $$i > result.$$name.sax ; \ |
---|
179 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
180 | diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax ; \ |
---|
181 | rm result.$$name.sax ; \ |
---|
182 | fi ; fi ; done) |
---|
183 | @echo "##" |
---|
184 | @echo "## Push HTML SAX regression tests" |
---|
185 | @echo "##" |
---|
186 | -@(for i in $(srcdir)/test/HTML/* ; do \ |
---|
187 | name=`basename $$i`; \ |
---|
188 | if [ ! -d $$i ] ; then \ |
---|
189 | if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ |
---|
190 | echo New test file $$name ; \ |
---|
191 | $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \ |
---|
192 | else \ |
---|
193 | echo Testing $$name ; \ |
---|
194 | $(CHECKER) $(top_builddir)/testHTML --push --sax $$i > result.$$name.sax ; \ |
---|
195 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
196 | diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax ; \ |
---|
197 | rm result.$$name.sax ; \ |
---|
198 | fi ; fi ; done) |
---|
199 | |
---|
200 | |
---|
201 | XMLtests : xmllint$(EXEEXT) |
---|
202 | @(echo > .memdump) |
---|
203 | @echo "##" |
---|
204 | @echo "## XML regression tests" |
---|
205 | @echo "##" |
---|
206 | @echo "## You should see one warning on entity 'title.xml' for ent2" |
---|
207 | @echo "##" |
---|
208 | -@(for i in $(srcdir)/test/* ; do \ |
---|
209 | name=`basename $$i`; \ |
---|
210 | if [ ! -d $$i ] ; then \ |
---|
211 | if [ ! -f $(srcdir)/result/$$name ] ; then \ |
---|
212 | echo New test file $$name ; \ |
---|
213 | $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/$$name ; \ |
---|
214 | else \ |
---|
215 | echo Testing $$name ; \ |
---|
216 | $(CHECKER) $(top_builddir)/xmllint $$i > result.$$name ; \ |
---|
217 | diff $(srcdir)/result/$$name result.$$name ; \ |
---|
218 | $(CHECKER) $(top_builddir)/xmllint result.$$name > result2.$$name ; \ |
---|
219 | diff result.$$name result2.$$name ; \ |
---|
220 | rm result.$$name result2.$$name ; \ |
---|
221 | fi ; fi ; done) |
---|
222 | @(echo > .memdump) |
---|
223 | @echo "##" |
---|
224 | @echo "## XML push regression tests" |
---|
225 | @echo "##" |
---|
226 | @echo "## You should see one warning on entity 'title.xml' for ent2" |
---|
227 | @echo "##" |
---|
228 | -@(for i in $(srcdir)/test/* ; do \ |
---|
229 | name=`basename $$i`; \ |
---|
230 | if [ ! -d $$i ] ; then \ |
---|
231 | if [ ! -f $(srcdir)/result/$$name ] ; then \ |
---|
232 | echo New test file $$name ; \ |
---|
233 | $(CHECKER) $(top_builddir)/xmllint --push $$i > $(srcdir)/result/$$name ; \ |
---|
234 | else \ |
---|
235 | echo Testing $$name ; \ |
---|
236 | $(CHECKER) $(top_builddir)/xmllint --push $$i > result.$$name ; \ |
---|
237 | diff $(srcdir)/result/$$name result.$$name ; \ |
---|
238 | $(CHECKER) $(top_builddir)/xmllint --push result.$$name > result2.$$name ; \ |
---|
239 | diff result.$$name result2.$$name ; \ |
---|
240 | rm result.$$name result2.$$name ; \ |
---|
241 | fi ; fi ; done) |
---|
242 | @echo "##" |
---|
243 | @echo "## XML regression tests on memory" |
---|
244 | @echo "##" |
---|
245 | @echo "## You should see two warnings on entity 'title.xml' for ent2" |
---|
246 | @echo "##" |
---|
247 | -@(for i in $(srcdir)/test/* ; do \ |
---|
248 | name=`basename $$i`; \ |
---|
249 | if [ ! -d $$i ] ; then \ |
---|
250 | if [ ! -f $(srcdir)/result/$$name ] ; then \ |
---|
251 | echo New test file $$name ; \ |
---|
252 | $(CHECKER) $(top_builddir)/xmllint --memory $$i > $(srcdir)/result/$$name ; \ |
---|
253 | else \ |
---|
254 | echo Testing $$name ; \ |
---|
255 | $(CHECKER) $(top_builddir)/xmllint --memory $$i > result.$$name ; \ |
---|
256 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
257 | diff $(srcdir)/result/$$name result.$$name ; \ |
---|
258 | $(CHECKER) $(top_builddir)/xmllint --memory result.$$name > result2.$$name ; \ |
---|
259 | diff result.$$name result2.$$name ; \ |
---|
260 | rm result.$$name result2.$$name ; \ |
---|
261 | fi ; fi ; done) |
---|
262 | |
---|
263 | Docbtests : xmllint$(EXEEXT) |
---|
264 | @(echo > .memdump) |
---|
265 | @echo "##" |
---|
266 | @echo "## SGML DocBook regression tests" |
---|
267 | @echo "##" |
---|
268 | -@(for i in $(srcdir)/test/DocBook/*.sgm ; do \ |
---|
269 | name=`basename $$i .sgm`; \ |
---|
270 | if [ ! -d $$i ] ; then \ |
---|
271 | if [ ! -f $(srcdir)/result/DocBook/$$name.xml ] ; then \ |
---|
272 | echo New test file $$name ; \ |
---|
273 | $(CHECKER) $(top_builddir)/xmllint --sgml $$i > $(srcdir)/result/DocBook/$$name.xml ; \ |
---|
274 | $(CHECKER) $(top_builddir)/xmllint --valid --noout $(srcdir)/result/DocBook/$$name.xml ; \ |
---|
275 | else \ |
---|
276 | echo Testing $$name ; \ |
---|
277 | $(CHECKER) $(top_builddir)/xmllint --sgml $$i > result.$$name ; \ |
---|
278 | diff $(srcdir)/result/DocBook/$$name.xml result.$$name ; \ |
---|
279 | $(CHECKER) $(top_builddir)/xmllint --valid --noout result.$$name ; \ |
---|
280 | rm result.$$name ; \ |
---|
281 | fi ; fi ; done) |
---|
282 | |
---|
283 | XMLenttests : xmllint$(EXEEXT) |
---|
284 | @(echo > .memdump) |
---|
285 | @echo "##" |
---|
286 | @echo "## XML entity subst regression tests" |
---|
287 | @echo "##" |
---|
288 | -@(for i in $(srcdir)/test/* ; do \ |
---|
289 | name=`basename $$i`; \ |
---|
290 | if [ ! -d $$i ] ; then \ |
---|
291 | if [ ! -f $(srcdir)/result/noent/$$name ] ; then \ |
---|
292 | echo New test file $$name ; \ |
---|
293 | $(CHECKER) $(top_builddir)/xmllint --noent $$i > $(srcdir)/result/noent/$$name ; \ |
---|
294 | else \ |
---|
295 | echo Testing $$name ; \ |
---|
296 | $(CHECKER) $(top_builddir)/xmllint --noent $$i > result.$$name ; \ |
---|
297 | diff $(srcdir)/result/noent/$$name result.$$name ; \ |
---|
298 | $(CHECKER) $(top_builddir)/xmllint --noent result.$$name > result2.$$name ; \ |
---|
299 | diff result.$$name result2.$$name ; \ |
---|
300 | rm result.$$name result2.$$name ; \ |
---|
301 | fi ; fi ; done) |
---|
302 | |
---|
303 | URItests : testURI$(EXEEXT) |
---|
304 | @(echo > .memdump) |
---|
305 | @echo "##" |
---|
306 | @echo "## URI module regression tests" |
---|
307 | @echo "##" |
---|
308 | -@(for i in $(srcdir)/test/URI/*.data ; do \ |
---|
309 | name=`basename $$i`; \ |
---|
310 | if [ ! -d $$i ] ; then \ |
---|
311 | if [ ! -f $(srcdir)/result/URI/$$name ] ; then \ |
---|
312 | echo New test file $$name ; \ |
---|
313 | $(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > $(srcdir)/result/URI/$$name ; \ |
---|
314 | else \ |
---|
315 | echo Testing $$name ; \ |
---|
316 | $(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > result.$$name ; \ |
---|
317 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
318 | diff $(srcdir)/result/URI/$$name result.$$name ; \ |
---|
319 | rm result.$$name ; \ |
---|
320 | fi ; fi ; done) |
---|
321 | -@(for i in $(srcdir)/test/URI/*.uri ; do \ |
---|
322 | name=`basename $$i`; \ |
---|
323 | if [ ! -d $$i ] ; then \ |
---|
324 | if [ ! -f $(srcdir)/result/URI/$$name ] ; then \ |
---|
325 | echo New test file $$name ; \ |
---|
326 | $(CHECKER) $(top_builddir)/testURI < $$i > $(srcdir)/result/URI/$$name ; \ |
---|
327 | else \ |
---|
328 | echo Testing $$name ; \ |
---|
329 | $(CHECKER) $(top_builddir)/testURI < $$i > result.$$name ; \ |
---|
330 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
331 | diff $(srcdir)/result/URI/$$name result.$$name ; \ |
---|
332 | rm result.$$name ; \ |
---|
333 | fi ; fi ; done) |
---|
334 | |
---|
335 | XPathtests : testXPath$(EXEEXT) |
---|
336 | @(echo > .memdump) |
---|
337 | @echo "##" |
---|
338 | @echo "## XPath regression tests" |
---|
339 | @echo "##" |
---|
340 | -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \ |
---|
341 | then echo Skipping debug not compiled in ; exit 0 ; fi ; \ |
---|
342 | for i in $(srcdir)/test/XPath/expr/* ; do \ |
---|
343 | name=`basename $$i`; \ |
---|
344 | if [ ! -d $$i ] ; then \ |
---|
345 | if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \ |
---|
346 | echo New test file $$name ; \ |
---|
347 | $(CHECKER) $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \ |
---|
348 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
349 | else \ |
---|
350 | echo Testing $$name ; \ |
---|
351 | $(CHECKER) $(top_builddir)/testXPath -f --expr $$i > result.$$name ; \ |
---|
352 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
353 | diff $(srcdir)/result/XPath/expr/$$name result.$$name ; \ |
---|
354 | rm result.$$name ; \ |
---|
355 | fi ; fi ; done ; \ |
---|
356 | for i in $(srcdir)/test/XPath/docs/* ; do \ |
---|
357 | if [ ! -d $$i ] ; then \ |
---|
358 | doc=`basename $$i`; \ |
---|
359 | for j in $(srcdir)/test/XPath/tests/$$doc* ; do \ |
---|
360 | if [ ! -f $$j ] ; then continue ; fi ; \ |
---|
361 | name=`basename $$j`; \ |
---|
362 | if [ ! -d $$j ] ; then \ |
---|
363 | if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \ |
---|
364 | echo New test file $$name ; \ |
---|
365 | $(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \ |
---|
366 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
367 | else \ |
---|
368 | echo Testing $$name ; \ |
---|
369 | $(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j > result.$$name ; \ |
---|
370 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
371 | diff $(srcdir)/result/XPath/tests/$$name result.$$name ; \ |
---|
372 | rm result.$$name ; \ |
---|
373 | fi ; fi ; done ; fi ; done) |
---|
374 | |
---|
375 | XPtrtests : testXPath$(EXEEXT) |
---|
376 | @(echo > .memdump) |
---|
377 | @echo "##" |
---|
378 | @echo "## XPointer regression tests" |
---|
379 | @echo "##" |
---|
380 | -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \ |
---|
381 | then echo Skipping debug not compiled in ; exit 0 ; fi ; \ |
---|
382 | for i in $(srcdir)/test/XPath/docs/* ; do \ |
---|
383 | if [ ! -d $$i ] ; then \ |
---|
384 | doc=`basename $$i`; \ |
---|
385 | for j in $(srcdir)/test/XPath/xptr/$$doc* ; do \ |
---|
386 | if [ ! -f $$j ] ; then continue ; fi ; \ |
---|
387 | name=`basename $$j`; \ |
---|
388 | if [ ! -d $$j ] ; then \ |
---|
389 | if [ ! -f $(srcdir)/result/XPath/xptr/$$name ] ; then \ |
---|
390 | echo New test file $$name ; \ |
---|
391 | ./testXPath -xptr -f -i $$i $$j > $(srcdir)/result/XPath/xptr/$$name ; \ |
---|
392 | else \ |
---|
393 | echo Testing $$name ; \ |
---|
394 | ./testXPath -xptr -f -i $$i $$j > result.$$name ; \ |
---|
395 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
396 | diff $(srcdir)/result/XPath/xptr/$$name result.$$name ; \ |
---|
397 | rm result.$$name ; \ |
---|
398 | fi ; fi ; done ; fi ; done) |
---|
399 | |
---|
400 | XIncludetests : xmllint$(EXEEXT) |
---|
401 | @(echo > .memdump) |
---|
402 | @echo "##" |
---|
403 | @echo "## XInclude regression tests" |
---|
404 | @echo "##" |
---|
405 | -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ |
---|
406 | name=`basename $$i`; \ |
---|
407 | if [ ! -d $$i ] ; then \ |
---|
408 | if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \ |
---|
409 | echo New test file $$name ; \ |
---|
410 | $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > $(srcdir)/result/XInclude/$$name ; \ |
---|
411 | else \ |
---|
412 | echo Testing $$name ; \ |
---|
413 | $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > result.$$name ; \ |
---|
414 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
415 | diff $(srcdir)/result/XInclude/$$name result.$$name ; \ |
---|
416 | rm result.$$name ; \ |
---|
417 | fi ; fi ; done) |
---|
418 | |
---|
419 | Scripttests : xmllint$(EXEEXT) |
---|
420 | @(echo > .memdump) |
---|
421 | @echo "##" |
---|
422 | @echo "## Scripts regression tests" |
---|
423 | @echo "## Some of the base computations may be different if srcdir != ." |
---|
424 | @echo "##" |
---|
425 | -@(for i in $(srcdir)/test/scripts/*.script ; do \ |
---|
426 | name=`basename $$i .script`; \ |
---|
427 | xml=$(srcdir)/test/scripts/`basename $$i .script`.xml; \ |
---|
428 | if [ -f $$xml ] ; then \ |
---|
429 | if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \ |
---|
430 | echo New test file $$name ; \ |
---|
431 | $(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > $(srcdir)/result/scripts/$$name ; \ |
---|
432 | else \ |
---|
433 | echo Testing $$name ; \ |
---|
434 | $(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > result.$$name ; \ |
---|
435 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
436 | diff $(srcdir)/result/scripts/$$name result.$$name ; \ |
---|
437 | rm result.$$name ; \ |
---|
438 | fi ; fi ; done) |
---|
439 | |
---|
440 | Catatests : xmlcatalog$(EXEEXT) |
---|
441 | @(echo > .memdump) |
---|
442 | @echo "##" |
---|
443 | @echo "## Catalog regression tests" |
---|
444 | @echo "##" |
---|
445 | -@(for i in $(srcdir)/test/catalogs/*.script ; do \ |
---|
446 | name=`basename $$i .script`; \ |
---|
447 | xml=$(srcdir)/test/catalogs/`basename $$i .script`.xml; \ |
---|
448 | if [ -f $$xml ] ; then \ |
---|
449 | if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \ |
---|
450 | echo New test file $$name ; \ |
---|
451 | $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i > $(srcdir)/result/catalogs/$$name ; \ |
---|
452 | else \ |
---|
453 | echo Testing $$name ; \ |
---|
454 | $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i > result.$$name ; \ |
---|
455 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
456 | diff $(srcdir)/result/catalogs/$$name result.$$name ; \ |
---|
457 | rm result.$$name ; \ |
---|
458 | fi ; fi ; done) |
---|
459 | -@(for i in $(srcdir)/test/catalogs/*.script ; do \ |
---|
460 | name=`basename $$i .script`; \ |
---|
461 | sgml=$(srcdir)/test/catalogs/`basename $$i .script`.sgml; \ |
---|
462 | if [ -f $$sgml ] ; then \ |
---|
463 | if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \ |
---|
464 | echo New test file $$name ; \ |
---|
465 | $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \ |
---|
466 | else \ |
---|
467 | echo Testing $$name ; \ |
---|
468 | $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \ |
---|
469 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
470 | diff $(srcdir)/result/catalogs/$$name result.$$name ; \ |
---|
471 | rm result.$$name ; \ |
---|
472 | fi ; fi ; done) |
---|
473 | @echo "Add and del operations on XML Catalogs" |
---|
474 | -@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout $(srcdir)/result/catalogs/mycatalog; \ |
---|
475 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
---|
476 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid sysid $(srcdir)/result/catalogs/mycatalog; \ |
---|
477 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
---|
478 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid2 sysid2 $(srcdir)/result/catalogs/mycatalog; \ |
---|
479 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
---|
480 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid3 sysid3 $(srcdir)/result/catalogs/mycatalog; \ |
---|
481 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
---|
482 | diff result/catalogs/mycatalog.full $(srcdir)/result/catalogs/mycatalog; \ |
---|
483 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
---|
484 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid $(srcdir)/result/catalogs/mycatalog; \ |
---|
485 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
---|
486 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid3 $(srcdir)/result/catalogs/mycatalog; \ |
---|
487 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
---|
488 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid2 $(srcdir)/result/catalogs/mycatalog; \ |
---|
489 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
---|
490 | diff result/catalogs/mycatalog.empty $(srcdir)/result/catalogs/mycatalog; \ |
---|
491 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \ |
---|
492 | rm -f $(srcdir)/result/catalogs/mycatalog) |
---|
493 | |
---|
494 | SVGtests : xmllint$(EXEEXT) |
---|
495 | @echo "##" |
---|
496 | @echo "## SVG parsing regression tests" |
---|
497 | @echo "##" |
---|
498 | -@(for i in $(srcdir)/test/SVG/* ; do \ |
---|
499 | name=`basename $$i`; \ |
---|
500 | if [ ! -d $$i ] ; then \ |
---|
501 | if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \ |
---|
502 | echo New test file $$name ; \ |
---|
503 | $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/SVG/$$name ; \ |
---|
504 | else \ |
---|
505 | echo Testing $$name ; \ |
---|
506 | $(CHECKER) $(top_builddir)/xmllint $$i > result.$$name ; \ |
---|
507 | diff $(srcdir)/result/SVG/$$name result.$$name ; \ |
---|
508 | $(CHECKER) $(top_builddir)/xmllint result.$$name > result2.$$name ; \ |
---|
509 | diff result.$$name result2.$$name ; \ |
---|
510 | rm result.$$name result2.$$name ; \ |
---|
511 | fi ; fi ; done) |
---|
512 | |
---|
513 | Threadtests : testThreads$(EXEEXT) |
---|
514 | @echo "##" |
---|
515 | @echo "## Threaded regression tests" |
---|
516 | @echo "##" |
---|
517 | $(CHECKER) $(top_builddir)/testThreads |
---|
518 | |
---|
519 | SAXtests : testSAX$(EXEEXT) |
---|
520 | @(echo > .memdump) |
---|
521 | @echo "##" |
---|
522 | @echo "## SAX callbacks regression tests" |
---|
523 | @echo "##" |
---|
524 | -@(for i in $(srcdir)/test/* ; do \ |
---|
525 | name=`basename $$i`; \ |
---|
526 | if [ ! -d $$i ] ; then \ |
---|
527 | if [ ! -f $(srcdir)/SAXresult/$$name ] ; then \ |
---|
528 | echo New test file $$name ; \ |
---|
529 | $(CHECKER) $(top_builddir)/testSAX $$i > $(srcdir)/SAXresult/$$name ; \ |
---|
530 | else \ |
---|
531 | echo Testing $$name ; \ |
---|
532 | $(CHECKER) $(top_builddir)/testSAX $$i > result.$$name ; \ |
---|
533 | diff $(srcdir)/SAXresult/$$name result.$$name ; \ |
---|
534 | rm result.$$name ; \ |
---|
535 | fi ; fi ; done) |
---|
536 | |
---|
537 | |
---|
538 | Validtests : xmllint$(EXEEXT) |
---|
539 | @(echo > .memdump) |
---|
540 | @echo "##" |
---|
541 | @echo "## Valid documents regression tests" |
---|
542 | @echo "##" |
---|
543 | -@(for i in $(srcdir)/test/VCM/* ; do \ |
---|
544 | name=`basename $$i`; \ |
---|
545 | if [ ! -d $$i ] ; then \ |
---|
546 | echo Testing $$name ; \ |
---|
547 | $(CHECKER) $(top_builddir)/xmllint --valid --noout --nowarning $$i ; \ |
---|
548 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
549 | fi ; done ; exit 0) |
---|
550 | @echo "##" |
---|
551 | @echo "## Validity checking regression tests" |
---|
552 | @echo "##" |
---|
553 | -@(for i in $(srcdir)/test/VC/* ; do \ |
---|
554 | name=`basename $$i`; \ |
---|
555 | if [ ! -d $$i ] ; then \ |
---|
556 | if [ ! -f $(srcdir)/result/VC/$$name ] ; then \ |
---|
557 | echo New test file $$name ; \ |
---|
558 | $(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \ |
---|
559 | else \ |
---|
560 | echo Testing $$name ; \ |
---|
561 | $(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \ |
---|
562 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
563 | diff $(srcdir)/result/VC/$$name result.$$name ; \ |
---|
564 | rm result.$$name ; \ |
---|
565 | fi ; fi ; done) |
---|
566 | @echo "##" |
---|
567 | @echo "## General documents valid regression tests" |
---|
568 | @echo "##" |
---|
569 | -@(for i in $(srcdir)/test/valid/* ; do \ |
---|
570 | name=`basename $$i`; \ |
---|
571 | if [ ! -d $$i ] ; then \ |
---|
572 | if [ ! -f $(srcdir)/result/valid/$$name ] ; then \ |
---|
573 | echo New test file $$name ; \ |
---|
574 | $(CHECKER) $(top_builddir)/xmllint --valid $$i > $(srcdir)/result/valid/$$name 2>$(srcdir)/result/valid/$$name.err ; \ |
---|
575 | else \ |
---|
576 | echo Testing $$name ; \ |
---|
577 | $(CHECKER) $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \ |
---|
578 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
579 | diff $(srcdir)/result/valid/$$name result.$$name ; \ |
---|
580 | diff $(srcdir)/result/valid/$$name.err error.$$name ; \ |
---|
581 | rm result.$$name error.$$name ; \ |
---|
582 | fi ; fi ; done) |
---|
583 | |
---|
584 | Regexptests: testRegexp$(EXEEXT) |
---|
585 | @(echo > .memdump) |
---|
586 | @echo "##" |
---|
587 | @echo "## Regexp regression tests" |
---|
588 | @echo "##" |
---|
589 | -@(for i in $(srcdir)/test/regexp/* ; do \ |
---|
590 | name=`basename $$i`; \ |
---|
591 | if [ ! -d $$i ] ; then \ |
---|
592 | if [ ! -f $(srcdir)/result/regexp/$$name ] ; then \ |
---|
593 | echo New test file $$name ; \ |
---|
594 | $(CHECKER) $(top_builddir)/testRegexp -i $$i > $(srcdir)/result/regexp/$$name; \ |
---|
595 | else \ |
---|
596 | echo Testing $$name ; \ |
---|
597 | $(CHECKER) $(top_builddir)/testRegexp -i $$i > result.$$name ; \ |
---|
598 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
599 | diff $(srcdir)/result/regexp/$$name result.$$name ; \ |
---|
600 | rm result.$$name ; \ |
---|
601 | fi ; fi ; done) |
---|
602 | |
---|
603 | Automatatests: testAutomata$(EXEEXT) |
---|
604 | @(echo > .memdump) |
---|
605 | @echo "##" |
---|
606 | @echo "## Automata regression tests" |
---|
607 | @echo "##" |
---|
608 | -@(for i in $(srcdir)/test/automata/* ; do \ |
---|
609 | name=`basename $$i`; \ |
---|
610 | if [ ! -d $$i ] ; then \ |
---|
611 | if [ ! -f $(srcdir)/result/automata/$$name ] ; then \ |
---|
612 | echo New test file $$name ; \ |
---|
613 | $(CHECKER) $(top_builddir)/testAutomata $$i > $(srcdir)/result/automata/$$name; \ |
---|
614 | else \ |
---|
615 | echo Testing $$name ; \ |
---|
616 | $(CHECKER) $(top_builddir)/testAutomata $$i > result.$$name ; \ |
---|
617 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
618 | diff $(srcdir)/result/automata/$$name result.$$name ; \ |
---|
619 | rm result.$$name ; \ |
---|
620 | fi ; fi ; done) |
---|
621 | |
---|
622 | C14Ntests : testC14N$(EXEEXT) |
---|
623 | @echo "##" |
---|
624 | @echo "## C14N and XPath regression tests" |
---|
625 | @echo "##" |
---|
626 | -@(for m in with-comments without-comments exc-without-comments ; do \ |
---|
627 | for i in $(srcdir)/test/c14n/$$m/*.xml ; do \ |
---|
628 | if [ ! -d $$i ] ; then \ |
---|
629 | name=`basename $$i .xml`; \ |
---|
630 | echo Testing $$m/$$name; \ |
---|
631 | cmdline="$(CHECKER) $(top_builddir)/testC14N --$$m $$i"; \ |
---|
632 | if [ -f $(srcdir)/test/c14n/$$m/$$name.xpath ] ; then \ |
---|
633 | cmdline="$$cmdline $(srcdir)/test/c14n/$$m/$$name.xpath"; \ |
---|
634 | if [ -f $(srcdir)/test/c14n/$$m/$$name.ns ] ; then \ |
---|
635 | cmdline="$$cmdline '`cat $(srcdir)/test/c14n/$$m/$$name.ns`'"; \ |
---|
636 | fi; \ |
---|
637 | fi; \ |
---|
638 | $$cmdline > $(srcdir)/test/c14n/test.tmp; \ |
---|
639 | if [ $$? -eq 0 ]; then \ |
---|
640 | diff $(srcdir)/result/c14n/$$m/$$name $(srcdir)/test/c14n/test.tmp; \ |
---|
641 | if [ $$? -ne 0 ]; then \ |
---|
642 | echo "Test failed"; \ |
---|
643 | cat $(srcdir)/test/c14n/test.tmp; \ |
---|
644 | fi; \ |
---|
645 | else \ |
---|
646 | echo "C14N failed"; \ |
---|
647 | fi; \ |
---|
648 | fi; \ |
---|
649 | rm -f $(srcdir)/test/c14n/test.tmp; \ |
---|
650 | done; \ |
---|
651 | done) |
---|
652 | |
---|
653 | Schemastests: testSchemas$(EXEEXT) |
---|
654 | @(echo > .memdump) |
---|
655 | @echo "##" |
---|
656 | @echo "## Schemas regression tests" |
---|
657 | @echo "##" |
---|
658 | -@(for i in $(srcdir)/test/schemas/*_*.xsd ; do \ |
---|
659 | name=`basename $$i | sed 's+_.*++'`; \ |
---|
660 | sno=`basename $$i | sed 's+.*_\(.*\).xsd+\1+'`; \ |
---|
661 | for j in $(srcdir)/test/schemas/"$$name"_*.xml ; do \ |
---|
662 | xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \ |
---|
663 | if [ ! -f $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" ]; \ |
---|
664 | then \ |
---|
665 | echo New test file "$$name"_"$$sno"_"$$xno" ; \ |
---|
666 | $(CHECKER) $(top_builddir)/testSchemas $$i $$j \ |
---|
667 | > $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \ |
---|
668 | 2> $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err; \ |
---|
669 | else \ |
---|
670 | echo Testing "$$name"_"$$sno"_"$$xno" ; \ |
---|
671 | $(CHECKER) $(top_builddir)/testSchemas $$i $$j \ |
---|
672 | > res.$$name 2> err.$$name;\ |
---|
673 | grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ |
---|
674 | diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \ |
---|
675 | res.$$name;\ |
---|
676 | diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err \ |
---|
677 | err.$$name;\ |
---|
678 | grep Unimplemented err.$$name; \ |
---|
679 | rm res.$$name err.$$name ; \ |
---|
680 | fi ; \ |
---|
681 | done; done) |
---|
682 | |
---|
683 | dist-hook: libxml.spec |
---|
684 | -cp libxml.spec $(distdir) |
---|
685 | (cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms test result SAXresult ) | (cd $(distdir); tar xf -) |
---|
686 | |
---|
687 | cleantar: |
---|
688 | @(rm -f libxml*.tar.gz COPYING.LIB) |
---|
689 | |
---|
690 | rpm: cleantar |
---|
691 | @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) |
---|
692 | |
---|
693 | ## We create xml2Conf.sh here and not from configure because we want |
---|
694 | ## to get the paths expanded correctly. Macros like srcdir are given |
---|
695 | ## the value NONE in configure if the user doesn't specify them (this |
---|
696 | ## is an autoconf feature, not a bug). |
---|
697 | |
---|
698 | CLEANFILES=xml2Conf.sh |
---|
699 | |
---|
700 | confexecdir=$(libdir) |
---|
701 | confexec_DATA = xml2Conf.sh |
---|
702 | EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml.spec \ |
---|
703 | libxml.m4 Copyright check-xml-test-suite.py \ |
---|
704 | example/Makefile.am example/gjobread.c example/gjobs.xml \ |
---|
705 | $(man_MANS) libxml-2.0.pc.in \ |
---|
706 | trionan.c trionan.h triostr.c triostr.h trio.c trio.h \ |
---|
707 | triop.h triodef.h libxml.h \ |
---|
708 | testThreadsWin32.c genUnicode.py TODO_SCHEMAS |
---|
709 | |
---|
710 | pkgconfigdir = $(libdir)/pkgconfig |
---|
711 | pkgconfig_DATA = libxml-2.0.pc |
---|
712 | |
---|
713 | # |
---|
714 | # Instll the tests program sources as examples |
---|
715 | # |
---|
716 | BASE_DIR=$(datadir)/doc |
---|
717 | DOC_MODULE=libxml2-$(VERSION) |
---|
718 | EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples |
---|
719 | |
---|
720 | install-data-local: |
---|
721 | $(mkinstalldirs) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) |
---|
722 | -@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) |
---|
723 | $(mkinstalldirs) $(DESTDIR)$(EXAMPLES_DIR) |
---|
724 | -@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) |
---|
725 | -@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) |
---|
726 | -@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) |
---|
727 | -@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR) |
---|