blob: f9d94262d79b250ed3672a2d23b76a948e39f5a2 [file] [log] [blame]
Daniel Veillard01791d51998-07-24 19:24:09 +00001## Process this file with automake to produce Makefile.in
Daniel Veillard4255d502002-04-16 15:50:10 +00002# AUTOMAKE_ OPTIONS=no-dependencies
Daniel Veillard77044732001-06-29 21:31:07 +00003
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +00004SUBDIRS = include . doc example python
Daniel Veillard19b858c1999-02-06 18:12:01 +00005
Daniel Veillardb8478642001-10-12 17:29:10 +00006INCLUDES = -I@srcdir@/include -I$(top_builddir)/include @THREAD_CFLAGS@ @Z_CFLAGS@
Daniel Veillard14fff061999-06-22 21:49:07 +00007
Daniel Veillarddecd64d2002-04-18 14:41:51 +00008noinst_PROGRAMS=testSchemas testSAX testHTML testXPath testURI testDocbook \
9 testThreads testC14N testAutomata testRegexp
Daniel Veillard27fb0751998-10-17 06:47:46 +000010
Daniel Veillard344cee72001-08-20 00:08:40 +000011bin_PROGRAMS = xmllint xmlcatalog
Daniel Veillard01791d51998-07-24 19:24:09 +000012
Owen Taylor3473f882001-02-23 17:55:21 +000013bin_SCRIPTS=xml2-config
14
15lib_LTLIBRARIES = libxml2.la
Daniel Veillardfdc91562002-07-01 21:52:03 +000016libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm
Owen Taylor3473f882001-02-23 17:55:21 +000017
18libxml2_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@
19
Daniel Veillard7150a032001-05-02 16:41:11 +000020if WITH_TRIO_SOURCES
Daniel Veillard92ad2102001-03-27 12:47:33 +000021libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
22 parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
23 valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \
Daniel Veillardeae522a2001-04-23 13:41:34 +000024 xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \
Daniel Veillard4255d502002-04-16 15:50:10 +000025 catalog.c globals.c threads.c c14n.c \
Daniel Veillard49d5af82002-05-23 11:55:49 +000026 xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
Daniel Veillard4255d502002-04-16 15:50:10 +000027 triostr.c trio.c
Daniel Veillard7150a032001-05-02 16:41:11 +000028else
29libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
30 parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
31 valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \
Daniel Veillarda7374592001-05-10 14:17:55 +000032 xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \
Daniel Veillard4255d502002-04-16 15:50:10 +000033 catalog.c globals.c threads.c c14n.c \
34 xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c
Daniel Veillard7150a032001-05-02 16:41:11 +000035endif
Owen Taylor3473f882001-02-23 17:55:21 +000036
37DEPS = $(top_builddir)/libxml2.la
Daniel Veillardb8478642001-10-12 17:29:10 +000038LDADDS = $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm
Owen Taylor3473f882001-02-23 17:55:21 +000039
Daniel Veillarde915b2d2002-03-06 18:42:40 +000040man_MANS = xml2-config.1 libxml.3
Owen Taylor3473f882001-02-23 17:55:21 +000041
42m4datadir = $(datadir)/aclocal
43m4data_DATA = libxml.m4
44
45xmllint_SOURCES=xmllint.c
Daniel Veillard361d8452000-04-03 19:48:13 +000046xmllint_LDFLAGS =
47xmllint_DEPENDENCIES = $(DEPS)
Owen Taylor3473f882001-02-23 17:55:21 +000048xmllint_LDADD= @RDL_LIBS@ $(LDADDS)
Daniel Veillard01791d51998-07-24 19:24:09 +000049
Owen Taylor3473f882001-02-23 17:55:21 +000050testSAX_SOURCES=testSAX.c
Daniel Veillard011b63c1999-06-02 17:44:04 +000051testSAX_LDFLAGS =
52testSAX_DEPENDENCIES = $(DEPS)
Owen Taylor3473f882001-02-23 17:55:21 +000053testSAX_LDADD= $(LDADDS)
Daniel Veillard011b63c1999-06-02 17:44:04 +000054
Owen Taylor3473f882001-02-23 17:55:21 +000055testHTML_SOURCES=testHTML.c
Daniel Veillardbe70ff71999-07-05 16:50:46 +000056testHTML_LDFLAGS =
57testHTML_DEPENDENCIES = $(DEPS)
Owen Taylor3473f882001-02-23 17:55:21 +000058testHTML_LDADD= $(LDADDS)
Daniel Veillardbe70ff71999-07-05 16:50:46 +000059
Daniel Veillardeae522a2001-04-23 13:41:34 +000060testDocbook_SOURCES=testDocbook.c
61testDocbook_LDFLAGS =
62testDocbook_DEPENDENCIES = $(DEPS)
63testDocbook_LDADD= $(LDADDS)
64
Daniel Veillard344cee72001-08-20 00:08:40 +000065xmlcatalog_SOURCES=xmlcatalog.c
66xmlcatalog_LDFLAGS =
67xmlcatalog_DEPENDENCIES = $(DEPS)
Daniel Veillard03f848d2001-11-07 12:53:46 +000068xmlcatalog_LDADD= @RDL_LIBS@ $(LDADDS)
Daniel Veillarda7374592001-05-10 14:17:55 +000069
Owen Taylor3473f882001-02-23 17:55:21 +000070testXPath_SOURCES=testXPath.c
Daniel Veillard1566d3a1999-07-15 14:24:29 +000071testXPath_LDFLAGS =
72testXPath_DEPENDENCIES = $(DEPS)
Owen Taylor3473f882001-02-23 17:55:21 +000073testXPath_LDADD= $(LDADDS)
Daniel Veillard1566d3a1999-07-15 14:24:29 +000074
Daniel Veillard044fc6b2002-03-04 17:09:44 +000075testC14N_SOURCES=testC14N.c
76testC14N_LDFLAGS =
77testC14N_DEPENDENCIES = $(DEPS)
78testC14N_LDADD= $(LDADDS)
79
Daniel Veillardab7488e2001-10-17 11:30:37 +000080testThreads_SOURCES=testThreads.c
81testThreads_LDFLAGS =
82testThreads_DEPENDENCIES = $(DEPS)
83testThreads_LDADD= $(LDADDS)
84
Owen Taylor3473f882001-02-23 17:55:21 +000085testURI_SOURCES=testURI.c
Daniel Veillard361d8452000-04-03 19:48:13 +000086testURI_LDFLAGS =
87testURI_DEPENDENCIES = $(DEPS)
Owen Taylor3473f882001-02-23 17:55:21 +000088testURI_LDADD= $(LDADDS)
Daniel Veillard361d8452000-04-03 19:48:13 +000089
Daniel Veillard4255d502002-04-16 15:50:10 +000090testRegexp_SOURCES=testRegexp.c
91testRegexp_LDFLAGS =
92testRegexp_DEPENDENCIES = $(DEPS)
93testRegexp_LDADD= $(LDADDS)
94
95testAutomata_SOURCES=testAutomata.c
96testAutomata_LDFLAGS =
97testAutomata_DEPENDENCIES = $(DEPS)
98testAutomata_LDADD= $(LDADDS)
99
100testSchemas_SOURCES=testSchemas.c
101testSchemas_LDFLAGS =
102testSchemas_DEPENDENCIES = $(DEPS)
103testSchemas_LDADD= $(LDADDS)
104
Raja R Harinatha86c23e1999-03-05 22:14:01 +0000105check-local: tests
106
Daniel Veillardf09e7e32000-10-01 15:53:30 +0000107testall : tests SVGtests SAXtests
Daniel Veillard011b63c1999-06-02 17:44:04 +0000108
Aleksey Sanin508a1012002-05-31 06:32:32 +0000109tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests C14Ntests Scripttests Catatests @TEST_SCHEMAS@ @TEST_THREADS@
Daniel Veillard0ba59232002-02-10 13:20:39 +0000110 @(cd python ; $(MAKE) tests)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000111
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000112valgrind:
113 @echo '## Running the regression tests under Valgrind'
114 @echo '## Go get a cup of coffee it is gonna take a while ...'
115 $(MAKE) CHECKER='valgrind -q' tests
116
Daniel Veillard07be19b2002-02-08 14:20:35 +0000117HTMLtests : testHTML$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000118 @(echo > .memdump)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000119 @echo "##"
120 @echo "## HTML regression tests"
121 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000122 -@(for i in $(srcdir)/test/HTML/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000123 name=`basename $$i`; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000124 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000125 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
126 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000127 $(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000128 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000129 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000130 $(CHECKER) $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000131 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000132 diff $(srcdir)/result/HTML/$$name result.$$name ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000133 diff -b $(srcdir)/result/HTML/$$name.err error.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000134 $(CHECKER) $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000135 diff result.$$name result2.$$name ; \
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000136 rm result.$$name result2.$$name error.$$name ; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000137 fi ; fi ; done)
Daniel Veillard87b95392000-08-12 21:12:04 +0000138 @echo "##"
139 @echo "## Push HTML regression tests"
140 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000141 -@(for i in $(srcdir)/test/HTML/* ; do \
Daniel Veillard87b95392000-08-12 21:12:04 +0000142 name=`basename $$i`; \
143 if [ ! -d $$i ] ; then \
144 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
145 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000146 $(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000147 else \
148 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000149 $(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000150 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
151 diff $(srcdir)/result/HTML/$$name result.$$name ; \
152 cut -b 1-15 $(srcdir)/result/HTML/$$name.err > errorcut.$$name; \
153 cut -b 1-15 error.$$name > errorcut2.$$name; \
154 diff -b errorcut.$$name errorcut2.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000155 $(CHECKER) $(top_builddir)/testHTML --push result.$$name > result2.$$name 2>error.$$name ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000156 diff result.$$name result2.$$name ; \
157 rm result.$$name result2.$$name error.$$name errorcut.$$name errorcut2.$$name ; \
158 fi ; fi ; done)
159 @echo "##"
160 @echo "## HTML SAX regression tests"
161 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000162 -@(for i in $(srcdir)/test/HTML/* ; do \
Daniel Veillard87b95392000-08-12 21:12:04 +0000163 name=`basename $$i`; \
164 if [ ! -d $$i ] ; then \
165 if [ ! -f $(srcdir)/result/HTML/$$name.sax ] ; then \
166 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000167 $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000168 else \
169 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000170 $(CHECKER) $(top_builddir)/testHTML --sax $$i > result.$$name.sax ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000171 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
172 diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax ; \
173 rm result.$$name.sax ; \
174 fi ; fi ; done)
175 @echo "##"
176 @echo "## Push HTML SAX regression tests"
177 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000178 -@(for i in $(srcdir)/test/HTML/* ; do \
Daniel Veillard87b95392000-08-12 21:12:04 +0000179 name=`basename $$i`; \
180 if [ ! -d $$i ] ; then \
181 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
182 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000183 $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000184 else \
185 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000186 $(CHECKER) $(top_builddir)/testHTML --push --sax $$i > result.$$name.sax ; \
Daniel Veillard87b95392000-08-12 21:12:04 +0000187 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
188 diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax ; \
189 rm result.$$name.sax ; \
190 fi ; fi ; done)
191
Daniel Veillard82150d81999-07-07 07:32:15 +0000192
Daniel Veillard07be19b2002-02-08 14:20:35 +0000193XMLtests : xmllint$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000194 @(echo > .memdump)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000195 @echo "##"
196 @echo "## XML regression tests"
197 @echo "##"
Daniel Veillardde57c612001-04-23 09:13:36 +0000198 @echo "## You should see one warning on entity 'title.xml' for ent2"
199 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000200 -@(for i in $(srcdir)/test/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000201 name=`basename $$i`; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000202 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000203 if [ ! -f $(srcdir)/result/$$name ] ; then \
204 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000205 $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/$$name ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000206 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000207 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000208 $(CHECKER) $(top_builddir)/xmllint $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000209 diff $(srcdir)/result/$$name result.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000210 $(CHECKER) $(top_builddir)/xmllint result.$$name > result2.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000211 diff result.$$name result2.$$name ; \
212 rm result.$$name result2.$$name ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000213 fi ; fi ; done)
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000214 @(echo > .memdump)
215 @echo "##"
216 @echo "## XML push regression tests"
217 @echo "##"
218 @echo "## You should see one warning on entity 'title.xml' for ent2"
219 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000220 -@(for i in $(srcdir)/test/* ; do \
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000221 name=`basename $$i`; \
222 if [ ! -d $$i ] ; then \
223 if [ ! -f $(srcdir)/result/$$name ] ; then \
224 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000225 $(CHECKER) $(top_builddir)/xmllint --push $$i > $(srcdir)/result/$$name ; \
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000226 else \
227 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000228 $(CHECKER) $(top_builddir)/xmllint --push $$i > result.$$name ; \
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000229 diff $(srcdir)/result/$$name result.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000230 $(CHECKER) $(top_builddir)/xmllint --push result.$$name > result2.$$name ; \
Daniel Veillard3e5bb8e2001-06-27 16:34:34 +0000231 diff result.$$name result2.$$name ; \
232 rm result.$$name result2.$$name ; \
233 fi ; fi ; done)
Daniel Veillarda6d8eb62000-12-27 10:46:47 +0000234 @echo "##"
235 @echo "## XML regression tests on memory"
236 @echo "##"
Daniel Veillardde57c612001-04-23 09:13:36 +0000237 @echo "## You should see two warnings on entity 'title.xml' for ent2"
238 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000239 -@(for i in $(srcdir)/test/* ; do \
Daniel Veillarda6d8eb62000-12-27 10:46:47 +0000240 name=`basename $$i`; \
241 if [ ! -d $$i ] ; then \
242 if [ ! -f $(srcdir)/result/$$name ] ; then \
243 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000244 $(CHECKER) $(top_builddir)/xmllint --memory $$i > $(srcdir)/result/$$name ; \
Daniel Veillarda6d8eb62000-12-27 10:46:47 +0000245 else \
246 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000247 $(CHECKER) $(top_builddir)/xmllint --memory $$i > result.$$name ; \
Daniel Veillarda6d8eb62000-12-27 10:46:47 +0000248 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
249 diff $(srcdir)/result/$$name result.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000250 $(CHECKER) $(top_builddir)/xmllint --memory result.$$name > result2.$$name ; \
Daniel Veillarda6d8eb62000-12-27 10:46:47 +0000251 diff result.$$name result2.$$name ; \
252 rm result.$$name result2.$$name ; \
253 fi ; fi ; done)
Daniel Veillard01791d51998-07-24 19:24:09 +0000254
Daniel Veillard07be19b2002-02-08 14:20:35 +0000255Docbtests : xmllint$(EXEEXT)
Daniel Veillard89cad532001-10-22 09:46:13 +0000256 @(echo > .memdump)
257 @echo "##"
258 @echo "## SGML DocBook regression tests"
259 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000260 -@(for i in $(srcdir)/test/DocBook/*.sgm ; do \
Daniel Veillard89cad532001-10-22 09:46:13 +0000261 name=`basename $$i .sgm`; \
262 if [ ! -d $$i ] ; then \
263 if [ ! -f $(srcdir)/result/DocBook/$$name.xml ] ; then \
264 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000265 $(CHECKER) $(top_builddir)/xmllint --sgml $$i > $(srcdir)/result/DocBook/$$name.xml ; \
266 $(CHECKER) $(top_builddir)/xmllint --valid --noout $(srcdir)/result/DocBook/$$name.xml ; \
Daniel Veillard89cad532001-10-22 09:46:13 +0000267 else \
268 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000269 $(CHECKER) $(top_builddir)/xmllint --sgml $$i > result.$$name ; \
Daniel Veillard89cad532001-10-22 09:46:13 +0000270 diff $(srcdir)/result/DocBook/$$name.xml result.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000271 $(CHECKER) $(top_builddir)/xmllint --valid --noout result.$$name ; \
Daniel Veillard89cad532001-10-22 09:46:13 +0000272 rm result.$$name ; \
273 fi ; fi ; done)
274
Daniel Veillard07be19b2002-02-08 14:20:35 +0000275XMLenttests : xmllint$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000276 @(echo > .memdump)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000277 @echo "##"
278 @echo "## XML entity subst regression tests"
279 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000280 -@(for i in $(srcdir)/test/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000281 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000282 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000283 if [ ! -f $(srcdir)/result/noent/$$name ] ; then \
284 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000285 $(CHECKER) $(top_builddir)/xmllint --noent $$i > $(srcdir)/result/noent/$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000286 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000287 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000288 $(CHECKER) $(top_builddir)/xmllint --noent $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000289 diff $(srcdir)/result/noent/$$name result.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000290 $(CHECKER) $(top_builddir)/xmllint --noent result.$$name > result2.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000291 diff result.$$name result2.$$name ; \
292 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000293 fi ; fi ; done)
294
Daniel Veillard07be19b2002-02-08 14:20:35 +0000295URItests : testURI$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000296 @(echo > .memdump)
Daniel Veillard98a79162000-09-04 11:15:39 +0000297 @echo "##"
298 @echo "## URI module regression tests"
299 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000300 -@(for i in $(srcdir)/test/URI/*.data ; do \
Daniel Veillard98a79162000-09-04 11:15:39 +0000301 name=`basename $$i`; \
302 if [ ! -d $$i ] ; then \
303 if [ ! -f $(srcdir)/result/URI/$$name ] ; then \
304 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000305 $(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > $(srcdir)/result/URI/$$name ; \
Daniel Veillard98a79162000-09-04 11:15:39 +0000306 else \
307 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000308 $(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > result.$$name ; \
Daniel Veillard98a79162000-09-04 11:15:39 +0000309 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
310 diff $(srcdir)/result/URI/$$name result.$$name ; \
311 rm result.$$name ; \
312 fi ; fi ; done)
Daniel Veillard36065812002-01-24 15:02:46 +0000313 -@(for i in $(srcdir)/test/URI/*.uri ; do \
Daniel Veillardb6e7fdb2001-02-02 17:07:32 +0000314 name=`basename $$i`; \
315 if [ ! -d $$i ] ; then \
316 if [ ! -f $(srcdir)/result/URI/$$name ] ; then \
317 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000318 $(CHECKER) $(top_builddir)/testURI < $$i > $(srcdir)/result/URI/$$name ; \
Daniel Veillardb6e7fdb2001-02-02 17:07:32 +0000319 else \
320 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000321 $(CHECKER) $(top_builddir)/testURI < $$i > result.$$name ; \
Daniel Veillardb6e7fdb2001-02-02 17:07:32 +0000322 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
323 diff $(srcdir)/result/URI/$$name result.$$name ; \
324 rm result.$$name ; \
325 fi ; fi ; done)
Daniel Veillard98a79162000-09-04 11:15:39 +0000326
Daniel Veillard07be19b2002-02-08 14:20:35 +0000327XPathtests : testXPath$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000328 @(echo > .memdump)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000329 @echo "##"
330 @echo "## XPath regression tests"
331 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000332 -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \
Daniel Veillard017b1082001-06-21 11:20:21 +0000333 then echo Skipping debug not compiled in ; exit 0 ; fi ; \
334 for i in $(srcdir)/test/XPath/expr/* ; do \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000335 name=`basename $$i`; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000336 if [ ! -d $$i ] ; then \
337 if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \
338 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000339 $(CHECKER) $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \
Daniel Veillard9e7160d2001-03-18 23:17:47 +0000340 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000341 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000342 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000343 $(CHECKER) $(top_builddir)/testXPath -f --expr $$i > result.$$name ; \
Daniel Veillard9e7160d2001-03-18 23:17:47 +0000344 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000345 diff $(srcdir)/result/XPath/expr/$$name result.$$name ; \
346 rm result.$$name ; \
Daniel Veillard017b1082001-06-21 11:20:21 +0000347 fi ; fi ; done ; \
348 for i in $(srcdir)/test/XPath/docs/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000349 if [ ! -d $$i ] ; then \
350 doc=`basename $$i`; \
351 for j in $(srcdir)/test/XPath/tests/$$doc* ; do \
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000352 if [ ! -f $$j ] ; then continue ; fi ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000353 name=`basename $$j`; \
354 if [ ! -d $$j ] ; then \
355 if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \
356 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000357 $(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \
Daniel Veillard9e7160d2001-03-18 23:17:47 +0000358 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000359 else \
360 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000361 $(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j > result.$$name ; \
Daniel Veillard9e7160d2001-03-18 23:17:47 +0000362 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000363 diff $(srcdir)/result/XPath/tests/$$name result.$$name ; \
364 rm result.$$name ; \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000365 fi ; fi ; done ; fi ; done)
366
Daniel Veillard07be19b2002-02-08 14:20:35 +0000367XPtrtests : testXPath$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000368 @(echo > .memdump)
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000369 @echo "##"
370 @echo "## XPointer regression tests"
371 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000372 -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \
Daniel Veillard017b1082001-06-21 11:20:21 +0000373 then echo Skipping debug not compiled in ; exit 0 ; fi ; \
374 for i in $(srcdir)/test/XPath/docs/* ; do \
Daniel Veillardc8df0aa2000-10-10 23:50:30 +0000375 if [ ! -d $$i ] ; then \
376 doc=`basename $$i`; \
377 for j in $(srcdir)/test/XPath/xptr/$$doc* ; do \
378 if [ ! -f $$j ] ; then continue ; fi ; \
379 name=`basename $$j`; \
380 if [ ! -d $$j ] ; then \
381 if [ ! -f $(srcdir)/result/XPath/xptr/$$name ] ; then \
382 echo New test file $$name ; \
383 ./testXPath -xptr -f -i $$i $$j > $(srcdir)/result/XPath/xptr/$$name ; \
384 else \
385 echo Testing $$name ; \
386 ./testXPath -xptr -f -i $$i $$j > result.$$name ; \
387 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
388 diff $(srcdir)/result/XPath/xptr/$$name result.$$name ; \
389 rm result.$$name ; \
390 fi ; fi ; done ; fi ; done)
391
Daniel Veillard07be19b2002-02-08 14:20:35 +0000392XIncludetests : xmllint$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000393 @(echo > .memdump)
Daniel Veillardbf432752000-11-12 15:56:56 +0000394 @echo "##"
395 @echo "## XInclude regression tests"
396 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000397 -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
Daniel Veillardbf432752000-11-12 15:56:56 +0000398 name=`basename $$i`; \
399 if [ ! -d $$i ] ; then \
400 if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \
401 echo New test file $$name ; \
Daniel Veillarde3b7d9a2002-08-14 14:11:30 +0000402 $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > $(srcdir)/result/XInclude/$$name ; \
Daniel Veillardbf432752000-11-12 15:56:56 +0000403 else \
404 echo Testing $$name ; \
Daniel Veillarde3b7d9a2002-08-14 14:11:30 +0000405 $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > result.$$name ; \
Daniel Veillardbf432752000-11-12 15:56:56 +0000406 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
407 diff $(srcdir)/result/XInclude/$$name result.$$name ; \
408 rm result.$$name ; \
409 fi ; fi ; done)
410
Daniel Veillard07be19b2002-02-08 14:20:35 +0000411Scripttests : xmllint$(EXEEXT)
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000412 @(echo > .memdump)
413 @echo "##"
414 @echo "## Scripts regression tests"
415 @echo "## Some of the base computations may be different if srcdir != ."
416 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000417 -@(for i in $(srcdir)/test/scripts/*.script ; do \
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000418 name=`basename $$i .script`; \
419 xml=$(srcdir)/test/scripts/`basename $$i .script`.xml; \
420 if [ -f $$xml ] ; then \
421 if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \
422 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000423 $(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > $(srcdir)/result/scripts/$$name ; \
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000424 else \
425 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000426 $(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > result.$$name ; \
Daniel Veillardb8c9be92001-07-09 16:01:19 +0000427 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
428 diff $(srcdir)/result/scripts/$$name result.$$name ; \
429 rm result.$$name ; \
430 fi ; fi ; done)
431
Daniel Veillard07be19b2002-02-08 14:20:35 +0000432Catatests : xmlcatalog$(EXEEXT)
Daniel Veillardcda96922001-08-21 10:56:31 +0000433 @(echo > .memdump)
434 @echo "##"
435 @echo "## Catalog regression tests"
436 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000437 -@(for i in $(srcdir)/test/catalogs/*.script ; do \
Daniel Veillardcda96922001-08-21 10:56:31 +0000438 name=`basename $$i .script`; \
439 xml=$(srcdir)/test/catalogs/`basename $$i .script`.xml; \
440 if [ -f $$xml ] ; then \
441 if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
442 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000443 $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i > $(srcdir)/result/catalogs/$$name ; \
Daniel Veillardcda96922001-08-21 10:56:31 +0000444 else \
445 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000446 $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i > result.$$name ; \
Daniel Veillardcda96922001-08-21 10:56:31 +0000447 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
448 diff $(srcdir)/result/catalogs/$$name result.$$name ; \
449 rm result.$$name ; \
450 fi ; fi ; done)
Daniel Veillard36065812002-01-24 15:02:46 +0000451 -@(for i in $(srcdir)/test/catalogs/*.script ; do \
Daniel Veillardc853b322001-11-06 15:24:37 +0000452 name=`basename $$i .script`; \
453 sgml=$(srcdir)/test/catalogs/`basename $$i .script`.sgml; \
454 if [ -f $$sgml ] ; then \
455 if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
456 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000457 $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000458 else \
459 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000460 $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000461 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
462 diff $(srcdir)/result/catalogs/$$name result.$$name ; \
463 rm result.$$name ; \
464 fi ; fi ; done)
465 @echo "Add and del operations on XML Catalogs"
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000466 -@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000467 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000468 $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid sysid result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000469 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000470 $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid2 sysid2 result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000471 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000472 $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid3 sysid3 result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000473 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
474 diff result/catalogs/mycatalog.full result/catalogs/mycatalog; \
475 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000476 $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000477 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000478 $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid3 result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000479 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000480 $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid2 result/catalogs/mycatalog; \
Daniel Veillardc853b322001-11-06 15:24:37 +0000481 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
482 diff result/catalogs/mycatalog.empty result/catalogs/mycatalog; \
483 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
484 rm -f result/catalogs/mycatalog)
Daniel Veillardcda96922001-08-21 10:56:31 +0000485
Daniel Veillard07be19b2002-02-08 14:20:35 +0000486SVGtests : xmllint$(EXEEXT)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000487 @echo "##"
488 @echo "## SVG parsing regression tests"
489 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000490 -@(for i in $(srcdir)/test/SVG/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000491 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000492 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000493 if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \
494 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000495 $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/SVG/$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000496 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000497 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000498 $(CHECKER) $(top_builddir)/xmllint $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000499 diff $(srcdir)/result/SVG/$$name result.$$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000500 $(CHECKER) $(top_builddir)/xmllint result.$$name > result2.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000501 diff result.$$name result2.$$name ; \
502 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000503 fi ; fi ; done)
504
Daniel Veillard07be19b2002-02-08 14:20:35 +0000505Threadtests : testThreads$(EXEEXT)
Daniel Veillardab7488e2001-10-17 11:30:37 +0000506 @echo "##"
507 @echo "## Threaded regression tests"
508 @echo "##"
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000509 $(CHECKER) $(top_builddir)/testThreads
Daniel Veillardab7488e2001-10-17 11:30:37 +0000510
Daniel Veillard07be19b2002-02-08 14:20:35 +0000511SAXtests : testSAX$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000512 @(echo > .memdump)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000513 @echo "##"
514 @echo "## SAX callbacks regression tests"
515 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000516 -@(for i in $(srcdir)/test/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000517 name=`basename $$i`; \
518 if [ ! -d $$i ] ; then \
519 if [ ! -f $(srcdir)/SAXresult/$$name ] ; then \
520 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000521 $(CHECKER) $(top_builddir)/testSAX $$i > $(srcdir)/SAXresult/$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000522 else \
523 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000524 $(CHECKER) $(top_builddir)/testSAX $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000525 diff $(srcdir)/SAXresult/$$name result.$$name ; \
526 rm result.$$name ; \
527 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000528
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000529
Daniel Veillard07be19b2002-02-08 14:20:35 +0000530Validtests : xmllint$(EXEEXT)
Daniel Veillard357c9602001-05-03 10:49:20 +0000531 @(echo > .memdump)
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000532 @echo "##"
533 @echo "## Valid documents regression tests"
534 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000535 -@(for i in $(srcdir)/test/VCM/* ; do \
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000536 name=`basename $$i`; \
537 if [ ! -d $$i ] ; then \
538 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000539 $(CHECKER) $(top_builddir)/xmllint --valid --noout --nowarning $$i ; \
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000540 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
541 fi ; done ; exit 0)
Daniel Veillardb05deb71999-08-10 19:04:08 +0000542 @echo "##"
543 @echo "## Validity checking regression tests"
544 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000545 -@(for i in $(srcdir)/test/VC/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000546 name=`basename $$i`; \
547 if [ ! -d $$i ] ; then \
548 if [ ! -f $(srcdir)/result/VC/$$name ] ; then \
549 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000550 $(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000551 else \
552 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000553 $(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000554 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000555 diff $(srcdir)/result/VC/$$name result.$$name ; \
556 rm result.$$name ; \
557 fi ; fi ; done)
558 @echo "##"
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000559 @echo "## General documents valid regression tests"
Daniel Veillardb05deb71999-08-10 19:04:08 +0000560 @echo "##"
Daniel Veillard36065812002-01-24 15:02:46 +0000561 -@(for i in $(srcdir)/test/valid/* ; do \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000562 name=`basename $$i`; \
563 if [ ! -d $$i ] ; then \
564 if [ ! -f $(srcdir)/result/valid/$$name ] ; then \
565 echo New test file $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000566 $(CHECKER) $(top_builddir)/xmllint --valid $$i > $(srcdir)/result/valid/$$name 2>$(srcdir)/result/valid/$$name.err ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000567 else \
568 echo Testing $$name ; \
Daniel Veillard4b3a84f2002-03-19 14:36:46 +0000569 $(CHECKER) $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \
Daniel Veillarddab4cb32001-04-20 13:03:48 +0000570 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
Daniel Veillardb05deb71999-08-10 19:04:08 +0000571 diff $(srcdir)/result/valid/$$name result.$$name ; \
Daniel Veillard35008381999-10-25 13:15:52 +0000572 diff $(srcdir)/result/valid/$$name.err error.$$name ; \
573 rm result.$$name error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000574 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000575
Daniel Veillard4255d502002-04-16 15:50:10 +0000576Regexptests: testRegexp$(EXEEXT)
577 @(echo > .memdump)
578 @echo "##"
579 @echo "## Regexp regression tests"
580 @echo "##"
581 -@(for i in $(srcdir)/test/regexp/* ; do \
582 name=`basename $$i`; \
583 if [ ! -d $$i ] ; then \
584 if [ ! -f $(srcdir)/result/regexp/$$name ] ; then \
585 echo New test file $$name ; \
586 $(CHECKER) $(top_builddir)/testRegexp -i $$i > $(srcdir)/result/regexp/$$name; \
587 else \
588 echo Testing $$name ; \
589 $(CHECKER) $(top_builddir)/testRegexp -i $$i > result.$$name ; \
590 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
591 diff $(srcdir)/result/regexp/$$name result.$$name ; \
592 rm result.$$name ; \
593 fi ; fi ; done)
594
595Automatatests: testAutomata$(EXEEXT)
596 @(echo > .memdump)
597 @echo "##"
598 @echo "## Automata regression tests"
599 @echo "##"
600 -@(for i in $(srcdir)/test/automata/* ; do \
601 name=`basename $$i`; \
602 if [ ! -d $$i ] ; then \
603 if [ ! -f $(srcdir)/result/automata/$$name ] ; then \
604 echo New test file $$name ; \
605 $(CHECKER) $(top_builddir)/testAutomata $$i > $(srcdir)/result/automata/$$name; \
606 else \
607 echo Testing $$name ; \
608 $(CHECKER) $(top_builddir)/testAutomata $$i > result.$$name ; \
609 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
610 diff $(srcdir)/result/automata/$$name result.$$name ; \
611 rm result.$$name ; \
612 fi ; fi ; done)
613
Aleksey Sanin508a1012002-05-31 06:32:32 +0000614C14Ntests : testC14N$(EXEEXT)
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000615 @echo "##"
616 @echo "## C14N and XPath regression tests"
617 @echo "##"
Aleksey Sanin508a1012002-05-31 06:32:32 +0000618 -@(for m in with-comments without-comments exc-without-comments ; do \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000619 for i in $(srcdir)/test/c14n/$$m/*.xml ; do \
620 if [ ! -d $$i ] ; then \
621 name=`basename $$i .xml`; \
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000622 echo Testing $$m/$$name; \
623 cmdline="$(CHECKER) $(top_builddir)/testC14N --$$m $$i"; \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000624 if [ -e $(srcdir)/test/c14n/$$m/$$name.xpath ] ; then \
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000625 cmdline="$$cmdline $(srcdir)/test/c14n/$$m/$$name.xpath"; \
626 if [ -e $(srcdir)/test/c14n/$$m/$$name.ns ] ; then \
627 cmdline="$$cmdline '`cat $(srcdir)/test/c14n/$$m/$$name.ns`'"; \
628 fi; \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000629 fi; \
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000630 $$cmdline > $(srcdir)/test/c14n/test.tmp; \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000631 if [ $$? -eq 0 ]; then \
Aleksey Saninc57f9c12002-05-31 19:14:57 +0000632 diff $(srcdir)/result/c14n/$$m/$$name $(srcdir)/test/c14n/test.tmp; \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000633 if [ $$? -ne 0 ]; then \
634 echo "Test failed"; \
Aleksey Saninf8cb6dd2002-06-04 04:27:06 +0000635 cat $(srcdir)/test/c14n/test.tmp; \
Aleksey Sanin508a1012002-05-31 06:32:32 +0000636 fi; \
637 else \
638 echo "C14N failed"; \
639 fi; \
640 fi; \
641 rm -f $(srcdir)/test/c14n/test.tmp; \
642 done; \
643 done)
Daniel Veillard4255d502002-04-16 15:50:10 +0000644
645Schemastests: testSchemas$(EXEEXT)
646 @(echo > .memdump)
647 @echo "##"
648 @echo "## Schemas regression tests"
649 @echo "##"
Daniel Veillard8651f532002-04-17 09:06:27 +0000650 -@(for i in $(srcdir)/test/schemas/*_*.xsd ; do \
651 name=`basename $$i | sed 's+_.*++'`; \
652 sno=`basename $$i | sed 's+.*_\(.*\).xsd+\1+'`; \
653 for j in $(srcdir)/test/schemas/"$$name"_*.xml ; do \
654 xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
655 if [ ! -f $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" ]; \
656 then \
Daniel Veillard6231e842002-04-18 11:54:04 +0000657 echo New test file "$$name"_"$$sno"_"$$xno" ; \
Daniel Veillard8651f532002-04-17 09:06:27 +0000658 $(CHECKER) $(top_builddir)/testSchemas $$i $$j \
659 > $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \
660 2> $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err; \
661 else \
Daniel Veillard6231e842002-04-18 11:54:04 +0000662 echo Testing "$$name"_"$$sno"_"$$xno" ; \
Daniel Veillard8651f532002-04-17 09:06:27 +0000663 $(CHECKER) $(top_builddir)/testSchemas $$i $$j \
664 > res.$$name 2> err.$$name;\
665 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
666 diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \
667 res.$$name;\
668 diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err \
669 err.$$name;\
Daniel Veillard88c58912002-04-23 07:12:20 +0000670 grep Unimplemented err.$$name; \
Daniel Veillard8651f532002-04-17 09:06:27 +0000671 rm res.$$name err.$$name ; \
672 fi ; \
673 done; done)
Daniel Veillard4255d502002-04-16 15:50:10 +0000674
Daniel Veillard1a123612001-09-19 08:06:23 +0000675dist-hook: libxml.spec
676 -cp libxml.spec $(distdir)
Daniel Veillardd3b08822001-12-05 12:03:33 +0000677 (cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms test result SAXresult ) | (cd $(distdir); tar xf -)
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000678
Daniel Veillard8e199902001-01-25 18:54:39 +0000679cleantar:
Daniel Veillard55253e22002-02-18 14:32:39 +0000680 @(rm -f libxml*.tar.gz COPYING.LIB)
Daniel Veillard8e199902001-01-25 18:54:39 +0000681
Daniel Veillard7db38712002-02-07 16:39:11 +0000682rpm: cleantar
683 @(unset CDPATH ; $(MAKE) dist && rpm -ta $(distdir).tar.gz)
Owen Taylor3473f882001-02-23 17:55:21 +0000684
685## We create xml2Conf.sh here and not from configure because we want
686## to get the paths expanded correctly. Macros like srcdir are given
687## the value NONE in configure if the user doesn't specify them (this
688## is an autoconf feature, not a bug).
689
Owen Taylor3473f882001-02-23 17:55:21 +0000690CLEANFILES=xml2Conf.sh
691
692confexecdir=$(libdir)
693confexec_DATA = xml2Conf.sh
Daniel Veillard3739b982001-06-19 12:51:30 +0000694EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml.spec \
Daniel Veillard55253e22002-02-18 14:32:39 +0000695 libxml.m4 Copyright check-xml-test-suite.py \
Owen Taylor3473f882001-02-23 17:55:21 +0000696 example/Makefile.am example/gjobread.c example/gjobs.xml \
Daniel Veillard07385fd2001-06-23 21:55:48 +0000697 $(man_MANS) libxml-2.0.pc.in \
Bjorn Reese026d29f2002-01-19 15:40:18 +0000698 trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
Daniel Veillarddb0eb8d2002-01-13 13:35:00 +0000699 triop.h triodef.h libxml.h \
Daniel Veillard8651f532002-04-17 09:06:27 +0000700 testThreadsWin32.c genUnicode.py TODO_SCHEMAS
Owen Taylor3473f882001-02-23 17:55:21 +0000701
702pkgconfigdir = $(libdir)/pkgconfig
703pkgconfig_DATA = libxml-2.0.pc
704
Daniel Veillard36065812002-01-24 15:02:46 +0000705#
706# Instll the tests program sources as examples
707#
708BASE_DIR=@HTML_DIR@
709DOC_MODULE=libxml2-$(VERSION)
710EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples
711
712install-data-local:
Daniel Veillardc575b992002-02-08 13:28:40 +0000713 $(mkinstalldirs) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
714 -@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
Daniel Veillard36065812002-01-24 15:02:46 +0000715 $(mkinstalldirs) $(DESTDIR)$(EXAMPLES_DIR)
716 -@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR)
717 -@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR)
718 -@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR)
719 -@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR)