blob: 74624dafa1e8974fce22e087798361f3e51037e9 [file] [log] [blame]
Daniel Veillard01791d51998-07-24 19:24:09 +00001## Process this file with automake to produce Makefile.in
2
Daniel Veillardbe9e5951999-07-12 09:16:45 +00003SUBDIRS = doc
Daniel Veillard19b858c1999-02-06 18:12:01 +00004
Daniel Veillard361d8452000-04-03 19:48:13 +00005INCLUDES = -I@srcdir@ @Z_CFLAGS@ @CORBA_CFLAGS@
Daniel Veillard14fff061999-06-22 21:49:07 +00006
Daniel Veillard361d8452000-04-03 19:48:13 +00007noinst_PROGRAMS=testSAX testHTML testXPath testURI
Daniel Veillard27fb0751998-10-17 06:47:46 +00008
Daniel Veillard361d8452000-04-03 19:48:13 +00009bin_PROGRAMS = xmllint
Daniel Veillard01791d51998-07-24 19:24:09 +000010
Daniel Veillarda6e1d121998-10-04 14:41:05 +000011bin_SCRIPTS=xml-config
12
Daniel Veillard0dc897e1998-07-26 04:12:22 +000013lib_LTLIBRARIES = libxml.la
Tomasz Kłoczkoae7cb7f2000-02-02 23:51:10 +000014libxml_la_LIBADD = @Z_LIBS@
Daniel Veillard01791d51998-07-24 19:24:09 +000015
Daniel Veillard14fff061999-06-22 21:49:07 +000016libxml_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@
17
Daniel Veillard0dc897e1998-07-26 04:12:22 +000018libxml_la_SOURCES = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000019 SAX.c \
20 entities.c \
Daniel Veillard891e4041998-10-19 00:43:02 +000021 encoding.c \
Daniel Veillard260a68f1998-08-13 03:39:55 +000022 error.c \
23 parser.c \
Daniel Veillard361d8452000-04-03 19:48:13 +000024 tree.c \
25 xmlIO.c \
26 xmlmemory.c \
27 uri.c \
28 valid.c \
29 xlink.c \
Daniel Veillardbe70ff71999-07-05 16:50:46 +000030 HTMLparser.c \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000031 HTMLtree.c \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000032 debugXML.c \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000033 xpath.c \
Daniel Veillard7f7d1111999-09-22 09:46:25 +000034 nanohttp.c \
Daniel Veillard361d8452000-04-03 19:48:13 +000035 nanoftp.c
Daniel Veillard260a68f1998-08-13 03:39:55 +000036
Daniel Veillard361d8452000-04-03 19:48:13 +000037xmlincdir = $(includedir)/libxml
Tom Tromeyc19653d1998-08-14 01:22:43 +000038xmlinc_HEADERS = \
Daniel Veillard294cbca1999-12-03 13:19:09 +000039 SAX.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000040 entities.h \
Daniel Veillard891e4041998-10-19 00:43:02 +000041 encoding.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000042 parser.h \
Daniel Veillard294cbca1999-12-03 13:19:09 +000043 parserInternals.h \
44 xml-error.h \
Daniel Veillard5233ffc1999-07-06 22:25:25 +000045 HTMLparser.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000046 HTMLtree.h \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000047 debugXML.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000048 tree.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000049 xpath.h \
Daniel Veillard14fff061999-06-22 21:49:07 +000050 xmlIO.h \
Daniel Veillard6454aec1999-09-02 22:04:43 +000051 xmlmemory.h \
Daniel Veillard7f7d1111999-09-22 09:46:25 +000052 nanohttp.h \
James Henstridgef3be9312000-01-28 13:59:21 +000053 nanoftp.h \
Daniel Veillard3dd82e72000-03-20 11:48:04 +000054 uri.h \
Daniel Veillard10a2c651999-12-12 13:03:50 +000055 valid.h \
Daniel Veillard361d8452000-04-03 19:48:13 +000056 xlink.h \
57 xmlversion.h
Daniel Veillard01791d51998-07-24 19:24:09 +000058
Daniel Veillard0dc897e1998-07-26 04:12:22 +000059DEPS = $(top_builddir)/libxml.la
Daniel Veillardb05deb71999-08-10 19:04:08 +000060LDADDS = $(top_builddir)/libxml.la @Z_LIBS@ @M_LIBS@
Daniel Veillard01791d51998-07-24 19:24:09 +000061
Daniel Veillard361d8452000-04-03 19:48:13 +000062xmllint_SOURCES=xmllint.c
63xmllint_LDFLAGS =
64xmllint_DEPENDENCIES = $(DEPS)
65xmllint_LDADD= @RDL_LIBS@ $(LDADDS)
Daniel Veillard01791d51998-07-24 19:24:09 +000066
Daniel Veillard011b63c1999-06-02 17:44:04 +000067testSAX_SOURCES=testSAX.c
68testSAX_LDFLAGS =
69testSAX_DEPENDENCIES = $(DEPS)
70testSAX_LDADD= $(LDADDS)
71
Daniel Veillardbe70ff71999-07-05 16:50:46 +000072testHTML_SOURCES=testHTML.c
73testHTML_LDFLAGS =
74testHTML_DEPENDENCIES = $(DEPS)
75testHTML_LDADD= $(LDADDS)
76
Daniel Veillard1566d3a1999-07-15 14:24:29 +000077testXPath_SOURCES=testXPath.c
78testXPath_LDFLAGS =
79testXPath_DEPENDENCIES = $(DEPS)
80testXPath_LDADD= $(LDADDS)
81
Daniel Veillard361d8452000-04-03 19:48:13 +000082testURI_SOURCES=testURI.c
83testURI_LDFLAGS =
84testURI_DEPENDENCIES = $(DEPS)
85testURI_LDADD= $(LDADDS)
86
Raja R Harinatha86c23e1999-03-05 22:14:01 +000087check-local: tests
88
Daniel Veillard361d8452000-04-03 19:48:13 +000089install-data: $(srcdir)/libxml
90
91$(srcdir)/libxml:
92 -$(RM) $(srcdir)/libxml
93 ln -s $(srcdir)/. $(srcdir)/libxml
94
Daniel Veillardb05deb71999-08-10 19:04:08 +000095testall : tests SVGtests SAXtests XPathtests XMLenttests
Daniel Veillard011b63c1999-06-02 17:44:04 +000096
Daniel Veillardb05deb71999-08-10 19:04:08 +000097tests: XMLtests HTMLtests Validtests
98
Daniel Veillard82150d81999-07-07 07:32:15 +000099HTMLtests : testHTML
Daniel Veillardb05deb71999-08-10 19:04:08 +0000100 @echo "##"
101 @echo "## HTML regression tests"
102 @echo "##"
103 @(for i in $(srcdir)/test/HTML/* ; do \
104 name=`basename $$i`; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000105 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000106 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
107 echo New test file $$name ; \
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000108 $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000109 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000110 echo Testing $$name ; \
Daniel Veillard35008381999-10-25 13:15:52 +0000111 $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000112 diff $(srcdir)/result/HTML/$$name result.$$name ; \
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000113 diff $(srcdir)/result/HTML/$$name.err error.$$name ; \
Daniel Veillard35008381999-10-25 13:15:52 +0000114 $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000115 diff result.$$name result2.$$name ; \
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000116 rm result.$$name result2.$$name error.$$name ; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000117 fi ; fi ; done)
118
Daniel Veillard361d8452000-04-03 19:48:13 +0000119XMLtests : xmllint
Daniel Veillardb05deb71999-08-10 19:04:08 +0000120 @echo "##"
121 @echo "## XML regression tests"
122 @echo "##"
123 @(for i in $(srcdir)/test/* ; do \
124 name=`basename $$i`; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000125 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000126 if [ ! -f $(srcdir)/result/$$name ] ; then \
127 echo New test file $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000128 $(top_builddir)/xmllint $$i > $(srcdir)/result/$$name ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000129 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000130 echo Testing $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000131 $(top_builddir)/xmllint $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000132 diff $(srcdir)/result/$$name result.$$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000133 $(top_builddir)/xmllint result.$$name > result2.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000134 diff result.$$name result2.$$name ; \
135 rm result.$$name result2.$$name ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000136 fi ; fi ; done)
137
Daniel Veillard361d8452000-04-03 19:48:13 +0000138XMLenttests : xmllint
Daniel Veillardb05deb71999-08-10 19:04:08 +0000139 @echo "##"
140 @echo "## XML entity subst regression tests"
141 @echo "##"
142 @(for i in $(srcdir)/test/* ; do \
143 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000144 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000145 if [ ! -f $(srcdir)/result/noent/$$name ] ; then \
146 echo New test file $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000147 $(top_builddir)/xmllint --noent $$i > $(srcdir)/result/noent/$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000148 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000149 echo Testing $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000150 $(top_builddir)/xmllint --noent $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000151 diff $(srcdir)/result/noent/$$name result.$$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000152 $(top_builddir)/xmllint --noent result.$$name > result2.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000153 diff result.$$name result2.$$name ; \
154 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000155 fi ; fi ; done)
156
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000157XPathtests : testXPath
Daniel Veillardb05deb71999-08-10 19:04:08 +0000158 @echo "##"
159 @echo "## XPath regression tests"
160 @echo "##"
161 @(for i in $(srcdir)/test/XPath/expr/* ; do \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000162 name=`basename $$i`; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000163 if [ ! -d $$i ] ; then \
164 if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \
165 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000166 $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000167 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000168 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000169 $(top_builddir)/testXPath -f --expr $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000170 diff $(srcdir)/result/XPath/expr/$$name result.$$name ; \
171 rm result.$$name ; \
172 fi ; fi ; done)
173 @(for i in $(srcdir)/test/XPath/docs/* ; do \
174 if [ ! -d $$i ] ; then \
175 doc=`basename $$i`; \
176 for j in $(srcdir)/test/XPath/tests/$$doc* ; do \
177 name=`basename $$j`; \
178 if [ ! -d $$j ] ; then \
179 if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \
180 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000181 $(top_builddir)/testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000182 else \
183 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000184 $(top_builddir)/testXPath -f -i $$i $$j > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000185 diff $(srcdir)/result/XPath/tests/$$name result.$$name ; \
186 rm result.$$name ; \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000187 fi ; fi ; done ; fi ; done)
188
Daniel Veillard361d8452000-04-03 19:48:13 +0000189SVGtests : xmllint
Daniel Veillardb05deb71999-08-10 19:04:08 +0000190 @echo "##"
191 @echo "## SVG parsing regression tests"
192 @echo "##"
193 @(for i in $(srcdir)/test/SVG/* ; do \
194 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000195 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000196 if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \
197 echo New test file $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000198 $(top_builddir)/xmllint $$i > $(srcdir)/result/SVG/$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000199 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000200 echo Testing $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000201 $(top_builddir)/xmllint $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000202 diff $(srcdir)/result/SVG/$$name result.$$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000203 $(top_builddir)/xmllint result.$$name > result2.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000204 diff result.$$name result2.$$name ; \
205 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000206 fi ; fi ; done)
207
Daniel Veillardb05deb71999-08-10 19:04:08 +0000208SAXtests : testSAX
209 @echo "##"
210 @echo "## SAX callbacks regression tests"
211 @echo "##"
212 @(for i in $(srcdir)/test/* ; do \
213 name=`basename $$i`; \
214 if [ ! -d $$i ] ; then \
215 if [ ! -f $(srcdir)/SAXresult/$$name ] ; then \
216 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000217 $(top_builddir)/testSAX $$i > $(srcdir)/SAXresult/$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000218 else \
219 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000220 $(top_builddir)/testSAX $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000221 diff $(srcdir)/SAXresult/$$name result.$$name ; \
222 rm result.$$name ; \
223 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000224
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000225
Daniel Veillard361d8452000-04-03 19:48:13 +0000226Validtests : xmllint
Daniel Veillardb05deb71999-08-10 19:04:08 +0000227 @echo "##"
228 @echo "## Validity checking regression tests"
229 @echo "##"
230 @(for i in $(srcdir)/test/VC/* ; do \
231 name=`basename $$i`; \
232 if [ ! -d $$i ] ; then \
233 if [ ! -f $(srcdir)/result/VC/$$name ] ; then \
234 echo New test file $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000235 $(top_builddir)/xmllint --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000236 else \
237 echo Testing $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000238 $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000239 diff $(srcdir)/result/VC/$$name result.$$name ; \
240 rm result.$$name ; \
241 fi ; fi ; done)
242 @echo "##"
243 @echo "## Valid documents regression tests"
244 @echo "##"
245 @(for i in $(srcdir)/test/valid/* ; do \
246 name=`basename $$i`; \
247 if [ ! -d $$i ] ; then \
248 if [ ! -f $(srcdir)/result/valid/$$name ] ; then \
249 echo New test file $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000250 $(top_builddir)/xmllint --valid $$i > $(srcdir)/result/valid/$$name 2>$(srcdir)/result/valid/$$name.err ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000251 else \
252 echo Testing $$name ; \
Daniel Veillard361d8452000-04-03 19:48:13 +0000253 $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000254 diff $(srcdir)/result/valid/$$name result.$$name ; \
Daniel Veillard35008381999-10-25 13:15:52 +0000255 diff $(srcdir)/result/valid/$$name.err error.$$name ; \
256 rm result.$$name error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000257 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000258
Elliot Leeca848471999-09-24 16:18:00 +0000259dist-hook: libxml.spec
Daniel Veillard9ec78f72000-01-05 16:31:25 +0000260 -cp libxml.spec $(distdir)
261 (cd $(srcdir) ; tar -cf - --exclude CVS test result SAXresult ) | (cd $(distdir); tar xf -)
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000262
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000263## We create xmlConf.sh here and not from configure because we want
264## to get the paths expanded correctly. Macros like srcdir are given
265## the value NONE in configure if the user doesn't specify them (this
266## is an autoconf feature, not a bug).
267
Daniel Veillardb556eb51999-08-15 17:19:50 +0000268confexecdir=$(libdir)
269confexec_DATA = xmlConf.sh
270
Elliot Lee56316b01999-08-23 18:18:32 +0000271CLEANFILES=xmlConf.sh
272
Daniel Veillardb556eb51999-08-15 17:19:50 +0000273confexecdir=$(libdir)
274confexec_DATA = xmlConf.sh
Daniel Veillard35008381999-10-25 13:15:52 +0000275EXTRA_DIST = xmlConf.sh.in libxml.spec.in libxml.spec \
Daniel Veillardb556eb51999-08-15 17:19:50 +0000276 example/Makefile.am example/gjobread.c example/gjobs.xml
277
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000278xmlConf.sh: xmlConf.sh.in Makefile
279## Use sed and then mv to avoid problems if the user interrupts.
Miguel de Icaza60681bd1998-09-30 19:28:59 +0000280 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
281 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
282 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
Daniel Veillard6077d031999-10-09 09:11:45 +0000283 -e 's?\@VERSION\@?$(VERSION)?g' \
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000284 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
285 && mv xmlConf.tmp xmlConf.sh