blob: d7ed138ec27c225fd247ddc8cf1c60f07f850c71 [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 Veillard71b656e2000-01-05 14:46:17 +00005INCLUDES = -I@srcdir@ @Z_CFLAGS@ @CORBA_CFLAGS@ $(VERSION_FLAGS)
Daniel Veillard14fff061999-06-22 21:49:07 +00006
7VERSION_FLAGS = -DLIBXML_VERSION=\"@LIBXML_VERSION@\"
Daniel Veillard27fb0751998-10-17 06:47:46 +00008
Daniel Veillard1566d3a1999-07-15 14:24:29 +00009noinst_PROGRAMS=tester testSAX testHTML testXPath
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 Veillardbe70ff71999-07-05 16:50:46 +000024 HTMLparser.c \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000025 HTMLtree.c \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000026 debugXML.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000027 tree.c \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000028 xpath.c \
Daniel Veillarde2d034d1999-07-27 19:52:06 +000029 xmlIO.c \
Daniel Veillard6454aec1999-09-02 22:04:43 +000030 xmlmemory.c \
Daniel Veillard7f7d1111999-09-22 09:46:25 +000031 nanohttp.c \
James Henstridgef3be9312000-01-28 13:59:21 +000032 nanoftp.c \
Daniel Veillard10a2c651999-12-12 13:03:50 +000033 valid.c \
34 xlink.c
Daniel Veillard260a68f1998-08-13 03:39:55 +000035
Tom Tromeyc19653d1998-08-14 01:22:43 +000036xmlincdir = $(includedir)/gnome-xml
37xmlinc_HEADERS = \
Daniel Veillard294cbca1999-12-03 13:19:09 +000038 SAX.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000039 entities.h \
Daniel Veillard891e4041998-10-19 00:43:02 +000040 encoding.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000041 parser.h \
Daniel Veillard294cbca1999-12-03 13:19:09 +000042 parserInternals.h \
43 xml-error.h \
Daniel Veillard5233ffc1999-07-06 22:25:25 +000044 HTMLparser.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000045 HTMLtree.h \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000046 debugXML.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000047 tree.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000048 xpath.h \
Daniel Veillard14fff061999-06-22 21:49:07 +000049 xmlIO.h \
Daniel Veillard6454aec1999-09-02 22:04:43 +000050 xmlmemory.h \
Daniel Veillard7f7d1111999-09-22 09:46:25 +000051 nanohttp.h \
James Henstridgef3be9312000-01-28 13:59:21 +000052 nanoftp.h \
Daniel Veillard10a2c651999-12-12 13:03:50 +000053 valid.h \
54 xlink.h
Daniel Veillard01791d51998-07-24 19:24:09 +000055
Daniel Veillard0dc897e1998-07-26 04:12:22 +000056DEPS = $(top_builddir)/libxml.la
Daniel Veillardb05deb71999-08-10 19:04:08 +000057LDADDS = $(top_builddir)/libxml.la @Z_LIBS@ @M_LIBS@
Daniel Veillard01791d51998-07-24 19:24:09 +000058
59tester_SOURCES=tester.c
60tester_LDFLAGS =
61tester_DEPENDENCIES = $(DEPS)
Daniel Veillard437b87b2000-01-03 17:30:46 +000062tester_LDADD= @RDL_LIBS@ $(LDADDS)
Daniel Veillard01791d51998-07-24 19:24:09 +000063
Daniel Veillard011b63c1999-06-02 17:44:04 +000064testSAX_SOURCES=testSAX.c
65testSAX_LDFLAGS =
66testSAX_DEPENDENCIES = $(DEPS)
67testSAX_LDADD= $(LDADDS)
68
Daniel Veillardbe70ff71999-07-05 16:50:46 +000069testHTML_SOURCES=testHTML.c
70testHTML_LDFLAGS =
71testHTML_DEPENDENCIES = $(DEPS)
72testHTML_LDADD= $(LDADDS)
73
Daniel Veillard1566d3a1999-07-15 14:24:29 +000074testXPath_SOURCES=testXPath.c
75testXPath_LDFLAGS =
76testXPath_DEPENDENCIES = $(DEPS)
77testXPath_LDADD= $(LDADDS)
78
Raja R Harinatha86c23e1999-03-05 22:14:01 +000079check-local: tests
80
Daniel Veillardb05deb71999-08-10 19:04:08 +000081testall : tests SVGtests SAXtests XPathtests XMLenttests
Daniel Veillard011b63c1999-06-02 17:44:04 +000082
Daniel Veillardb05deb71999-08-10 19:04:08 +000083tests: XMLtests HTMLtests Validtests
84
Daniel Veillard82150d81999-07-07 07:32:15 +000085HTMLtests : testHTML
Daniel Veillardb05deb71999-08-10 19:04:08 +000086 @echo "##"
87 @echo "## HTML regression tests"
88 @echo "##"
89 @(for i in $(srcdir)/test/HTML/* ; do \
90 name=`basename $$i`; \
Daniel Veillard82150d81999-07-07 07:32:15 +000091 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +000092 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
93 echo New test file $$name ; \
Daniel Veillard7c1206f1999-10-14 09:10:25 +000094 $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
Daniel Veillard82150d81999-07-07 07:32:15 +000095 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +000096 echo Testing $$name ; \
Daniel Veillard35008381999-10-25 13:15:52 +000097 $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +000098 diff $(srcdir)/result/HTML/$$name result.$$name ; \
Daniel Veillard7c1206f1999-10-14 09:10:25 +000099 diff $(srcdir)/result/HTML/$$name.err error.$$name ; \
Daniel Veillard35008381999-10-25 13:15:52 +0000100 $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000101 diff result.$$name result2.$$name ; \
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000102 rm result.$$name result2.$$name error.$$name ; \
Daniel Veillard82150d81999-07-07 07:32:15 +0000103 fi ; fi ; done)
104
105XMLtests : tester
Daniel Veillardb05deb71999-08-10 19:04:08 +0000106 @echo "##"
107 @echo "## XML regression tests"
108 @echo "##"
109 @(for i in $(srcdir)/test/* ; do \
110 name=`basename $$i`; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000111 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000112 if [ ! -f $(srcdir)/result/$$name ] ; then \
113 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000114 $(top_builddir)/tester $$i > $(srcdir)/result/$$name ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000115 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000116 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000117 $(top_builddir)/tester $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000118 diff $(srcdir)/result/$$name result.$$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000119 $(top_builddir)/tester result.$$name > result2.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000120 diff result.$$name result2.$$name ; \
121 rm result.$$name result2.$$name ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000122 fi ; fi ; done)
123
Daniel Veillardb05deb71999-08-10 19:04:08 +0000124XMLenttests : tester
125 @echo "##"
126 @echo "## XML entity subst regression tests"
127 @echo "##"
128 @(for i in $(srcdir)/test/* ; do \
129 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000130 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000131 if [ ! -f $(srcdir)/result/noent/$$name ] ; then \
132 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000133 $(top_builddir)/tester --noent $$i > $(srcdir)/result/noent/$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000134 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000135 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000136 $(top_builddir)/tester --noent $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000137 diff $(srcdir)/result/noent/$$name result.$$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000138 $(top_builddir)/tester --noent result.$$name > result2.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000139 diff result.$$name result2.$$name ; \
140 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000141 fi ; fi ; done)
142
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000143XPathtests : testXPath
Daniel Veillardb05deb71999-08-10 19:04:08 +0000144 @echo "##"
145 @echo "## XPath regression tests"
146 @echo "##"
147 @(for i in $(srcdir)/test/XPath/expr/* ; do \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000148 name=`basename $$i`; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000149 if [ ! -d $$i ] ; then \
150 if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \
151 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000152 $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000153 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000154 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000155 $(top_builddir)/testXPath -f --expr $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000156 diff $(srcdir)/result/XPath/expr/$$name result.$$name ; \
157 rm result.$$name ; \
158 fi ; fi ; done)
159 @(for i in $(srcdir)/test/XPath/docs/* ; do \
160 if [ ! -d $$i ] ; then \
161 doc=`basename $$i`; \
162 for j in $(srcdir)/test/XPath/tests/$$doc* ; do \
163 name=`basename $$j`; \
164 if [ ! -d $$j ] ; then \
165 if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \
166 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000167 $(top_builddir)/testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000168 else \
169 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000170 $(top_builddir)/testXPath -f -i $$i $$j > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000171 diff $(srcdir)/result/XPath/tests/$$name result.$$name ; \
172 rm result.$$name ; \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000173 fi ; fi ; done ; fi ; done)
174
Daniel Veillardb05deb71999-08-10 19:04:08 +0000175SVGtests : tester
176 @echo "##"
177 @echo "## SVG parsing regression tests"
178 @echo "##"
179 @(for i in $(srcdir)/test/SVG/* ; do \
180 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000181 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000182 if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \
183 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000184 $(top_builddir)/tester $$i > $(srcdir)/result/SVG/$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000185 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000186 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000187 $(top_builddir)/tester $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000188 diff $(srcdir)/result/SVG/$$name result.$$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000189 $(top_builddir)/tester result.$$name > result2.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000190 diff result.$$name result2.$$name ; \
191 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000192 fi ; fi ; done)
193
Daniel Veillardb05deb71999-08-10 19:04:08 +0000194SAXtests : testSAX
195 @echo "##"
196 @echo "## SAX callbacks regression tests"
197 @echo "##"
198 @(for i in $(srcdir)/test/* ; do \
199 name=`basename $$i`; \
200 if [ ! -d $$i ] ; then \
201 if [ ! -f $(srcdir)/SAXresult/$$name ] ; then \
202 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000203 $(top_builddir)/testSAX $$i > $(srcdir)/SAXresult/$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000204 else \
205 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000206 $(top_builddir)/testSAX $$i > result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000207 diff $(srcdir)/SAXresult/$$name result.$$name ; \
208 rm result.$$name ; \
209 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000210
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000211
Daniel Veillardb05deb71999-08-10 19:04:08 +0000212Validtests : tester
213 @echo "##"
214 @echo "## Validity checking regression tests"
215 @echo "##"
216 @(for i in $(srcdir)/test/VC/* ; do \
217 name=`basename $$i`; \
218 if [ ! -d $$i ] ; then \
219 if [ ! -f $(srcdir)/result/VC/$$name ] ; then \
220 echo New test file $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000221 $(top_builddir)/tester --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000222 else \
223 echo Testing $$name ; \
CEST 1999 Timur Bakeyev6db3cb01999-09-04 20:25:14 +0000224 $(top_builddir)/tester --noout --valid $$i 2> result.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000225 diff $(srcdir)/result/VC/$$name result.$$name ; \
226 rm result.$$name ; \
227 fi ; fi ; done)
228 @echo "##"
229 @echo "## Valid documents regression tests"
230 @echo "##"
231 @(for i in $(srcdir)/test/valid/* ; do \
232 name=`basename $$i`; \
233 if [ ! -d $$i ] ; then \
234 if [ ! -f $(srcdir)/result/valid/$$name ] ; then \
235 echo New test file $$name ; \
Daniel Veillard35008381999-10-25 13:15:52 +0000236 $(top_builddir)/tester --valid $$i > $(srcdir)/result/valid/$$name 2>$(srcdir)/result/valid/$$name.err ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000237 else \
238 echo Testing $$name ; \
Daniel Veillard35008381999-10-25 13:15:52 +0000239 $(top_builddir)/tester --valid $$i > result.$$name 2>error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000240 diff $(srcdir)/result/valid/$$name result.$$name ; \
Daniel Veillard35008381999-10-25 13:15:52 +0000241 diff $(srcdir)/result/valid/$$name.err error.$$name ; \
242 rm result.$$name error.$$name ; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000243 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000244
Elliot Leeca848471999-09-24 16:18:00 +0000245dist-hook: libxml.spec
Daniel Veillard9ec78f72000-01-05 16:31:25 +0000246 -cp libxml.spec $(distdir)
247 (cd $(srcdir) ; tar -cf - --exclude CVS test result SAXresult ) | (cd $(distdir); tar xf -)
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000248
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000249## We create xmlConf.sh here and not from configure because we want
250## to get the paths expanded correctly. Macros like srcdir are given
251## the value NONE in configure if the user doesn't specify them (this
252## is an autoconf feature, not a bug).
253
Daniel Veillardb556eb51999-08-15 17:19:50 +0000254confexecdir=$(libdir)
255confexec_DATA = xmlConf.sh
256
Elliot Lee56316b01999-08-23 18:18:32 +0000257CLEANFILES=xmlConf.sh
258
Daniel Veillardb556eb51999-08-15 17:19:50 +0000259EXTRA_DIST = xmlConf.sh.in
260
261confexecdir=$(libdir)
262confexec_DATA = xmlConf.sh
Daniel Veillard35008381999-10-25 13:15:52 +0000263EXTRA_DIST = xmlConf.sh.in libxml.spec.in libxml.spec \
Daniel Veillardb556eb51999-08-15 17:19:50 +0000264 example/Makefile.am example/gjobread.c example/gjobs.xml
265
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000266xmlConf.sh: xmlConf.sh.in Makefile
267## Use sed and then mv to avoid problems if the user interrupts.
Miguel de Icaza60681bd1998-09-30 19:28:59 +0000268 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
269 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
270 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
Daniel Veillard6077d031999-10-09 09:11:45 +0000271 -e 's?\@VERSION\@?$(VERSION)?g' \
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000272 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
273 && mv xmlConf.tmp xmlConf.sh