blob: 36fde35d514f840423f41f6740ca1ff486448be6 [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 Veillard14fff061999-06-22 21:49:07 +00005INCLUDES = -I@srcdir@ @CORBA_CFLAGS@ $(VERSION_FLAGS)
6
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
Daniel Veillard01791d51998-07-24 19:24:09 +000014
Daniel Veillard14fff061999-06-22 21:49:07 +000015libxml_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@
16
Daniel Veillard0dc897e1998-07-26 04:12:22 +000017libxml_la_SOURCES = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000018 SAX.c \
19 entities.c \
Daniel Veillard891e4041998-10-19 00:43:02 +000020 encoding.c \
Daniel Veillard260a68f1998-08-13 03:39:55 +000021 error.c \
22 parser.c \
Daniel Veillardbe70ff71999-07-05 16:50:46 +000023 HTMLparser.c \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000024 HTMLtree.c \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000025 debugXML.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000026 tree.c \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000027 xpath.c \
Daniel Veillarde2d034d1999-07-27 19:52:06 +000028 xmlIO.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000029 valid.c
Daniel Veillard260a68f1998-08-13 03:39:55 +000030
Tom Tromeyc19653d1998-08-14 01:22:43 +000031xmlincdir = $(includedir)/gnome-xml
32xmlinc_HEADERS = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000033 entities.h \
Daniel Veillard891e4041998-10-19 00:43:02 +000034 encoding.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000035 parser.h \
Daniel Veillard5233ffc1999-07-06 22:25:25 +000036 HTMLparser.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000037 HTMLtree.h \
Daniel Veillard35925471999-02-25 08:46:07 +000038 parserInternals.h \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000039 debugXML.h \
Daniel Veillardd109e371999-03-05 06:26:45 +000040 xml-error.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000041 tree.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000042 xpath.h \
Daniel Veillard14fff061999-06-22 21:49:07 +000043 xmlIO.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000044 valid.h
Daniel Veillard01791d51998-07-24 19:24:09 +000045
Daniel Veillard0dc897e1998-07-26 04:12:22 +000046DEPS = $(top_builddir)/libxml.la
Daniel Veillardb05deb71999-08-10 19:04:08 +000047LDADDS = $(top_builddir)/libxml.la @Z_LIBS@ @M_LIBS@
Daniel Veillard01791d51998-07-24 19:24:09 +000048
49tester_SOURCES=tester.c
50tester_LDFLAGS =
51tester_DEPENDENCIES = $(DEPS)
52tester_LDADD= $(LDADDS)
53
Daniel Veillard011b63c1999-06-02 17:44:04 +000054testSAX_SOURCES=testSAX.c
55testSAX_LDFLAGS =
56testSAX_DEPENDENCIES = $(DEPS)
57testSAX_LDADD= $(LDADDS)
58
Daniel Veillardbe70ff71999-07-05 16:50:46 +000059testHTML_SOURCES=testHTML.c
60testHTML_LDFLAGS =
61testHTML_DEPENDENCIES = $(DEPS)
62testHTML_LDADD= $(LDADDS)
63
Daniel Veillard1566d3a1999-07-15 14:24:29 +000064testXPath_SOURCES=testXPath.c
65testXPath_LDFLAGS =
66testXPath_DEPENDENCIES = $(DEPS)
67testXPath_LDADD= $(LDADDS)
68
Raja R Harinatha86c23e1999-03-05 22:14:01 +000069check-local: tests
70
Daniel Veillardb05deb71999-08-10 19:04:08 +000071testall : tests SVGtests SAXtests XPathtests XMLenttests
Daniel Veillard011b63c1999-06-02 17:44:04 +000072
Daniel Veillardb05deb71999-08-10 19:04:08 +000073tests: XMLtests HTMLtests Validtests
74
Daniel Veillard82150d81999-07-07 07:32:15 +000075HTMLtests : testHTML
Daniel Veillardb05deb71999-08-10 19:04:08 +000076 @echo "##"
77 @echo "## HTML regression tests"
78 @echo "##"
79 @(for i in $(srcdir)/test/HTML/* ; do \
80 name=`basename $$i`; \
Daniel Veillard82150d81999-07-07 07:32:15 +000081 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +000082 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
83 echo New test file $$name ; \
84 testHTML $$i > $(srcdir)/result/HTML/$$name ; \
Daniel Veillard82150d81999-07-07 07:32:15 +000085 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +000086 echo Testing $$name ; \
87 testHTML $$i > result.$$name ; \
88 diff $(srcdir)/result/HTML/$$name result.$$name ; \
89 testHTML result.$$name > result2.$$name ; \
90 diff result.$$name result2.$$name ; \
91 rm result.$$name result2.$$name ; \
Daniel Veillard82150d81999-07-07 07:32:15 +000092 fi ; fi ; done)
93
94XMLtests : tester
Daniel Veillardb05deb71999-08-10 19:04:08 +000095 @echo "##"
96 @echo "## XML regression tests"
97 @echo "##"
98 @(for i in $(srcdir)/test/* ; do \
99 name=`basename $$i`; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000100 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000101 if [ ! -f $(srcdir)/result/$$name ] ; then \
102 echo New test file $$name ; \
103 tester $$i > $(srcdir)/result/$$name ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000104 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000105 echo Testing $$name ; \
106 tester $$i > result.$$name ; \
107 diff $(srcdir)/result/$$name result.$$name ; \
108 tester result.$$name > result2.$$name ; \
109 diff result.$$name result2.$$name ; \
110 rm result.$$name result2.$$name ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000111 fi ; fi ; done)
112
Daniel Veillardb05deb71999-08-10 19:04:08 +0000113XMLenttests : tester
114 @echo "##"
115 @echo "## XML entity subst regression tests"
116 @echo "##"
117 @(for i in $(srcdir)/test/* ; do \
118 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000119 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000120 if [ ! -f $(srcdir)/result/noent/$$name ] ; then \
121 echo New test file $$name ; \
122 tester --noent $$i > $(srcdir)/result/noent/$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000123 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000124 echo Testing $$name ; \
125 tester --noent $$i > result.$$name ; \
126 diff $(srcdir)/result/noent/$$name result.$$name ; \
127 tester --noent result.$$name > result2.$$name ; \
128 diff result.$$name result2.$$name ; \
129 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000130 fi ; fi ; done)
131
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000132XPathtests : testXPath
Daniel Veillardb05deb71999-08-10 19:04:08 +0000133 @echo "##"
134 @echo "## XPath regression tests"
135 @echo "##"
136 @(for i in $(srcdir)/test/XPath/expr/* ; do \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000137 name=`basename $$i`; \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000138 if [ ! -d $$i ] ; then \
139 if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \
140 echo New test file $$name ; \
141 testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000142 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000143 echo Testing $$name ; \
144 testXPath -f --expr $$i > result.$$name ; \
145 diff $(srcdir)/result/XPath/expr/$$name result.$$name ; \
146 rm result.$$name ; \
147 fi ; fi ; done)
148 @(for i in $(srcdir)/test/XPath/docs/* ; do \
149 if [ ! -d $$i ] ; then \
150 doc=`basename $$i`; \
151 for j in $(srcdir)/test/XPath/tests/$$doc* ; do \
152 name=`basename $$j`; \
153 if [ ! -d $$j ] ; then \
154 if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \
155 echo New test file $$name ; \
156 testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \
157 else \
158 echo Testing $$name ; \
159 testXPath -f -i $$i $$j > result.$$name ; \
160 diff $(srcdir)/result/XPath/tests/$$name result.$$name ; \
161 rm result.$$name ; \
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000162 fi ; fi ; done ; fi ; done)
163
Daniel Veillardb05deb71999-08-10 19:04:08 +0000164SVGtests : tester
165 @echo "##"
166 @echo "## SVG parsing regression tests"
167 @echo "##"
168 @(for i in $(srcdir)/test/SVG/* ; do \
169 name=`basename $$i`; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000170 if [ ! -d $$i ] ; then \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000171 if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \
172 echo New test file $$name ; \
173 tester $$i > $(srcdir)/result/SVG/$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000174 else \
Daniel Veillardb05deb71999-08-10 19:04:08 +0000175 echo Testing $$name ; \
176 tester $$i > result.$$name ; \
177 diff $(srcdir)/result/SVG/$$name result.$$name ; \
178 tester result.$$name > result2.$$name ; \
179 diff result.$$name result2.$$name ; \
180 rm result.$$name result2.$$name ; \
Daniel Veillard011b63c1999-06-02 17:44:04 +0000181 fi ; fi ; done)
182
Daniel Veillardb05deb71999-08-10 19:04:08 +0000183SAXtests : testSAX
184 @echo "##"
185 @echo "## SAX callbacks regression tests"
186 @echo "##"
187 @(for i in $(srcdir)/test/* ; do \
188 name=`basename $$i`; \
189 if [ ! -d $$i ] ; then \
190 if [ ! -f $(srcdir)/SAXresult/$$name ] ; then \
191 echo New test file $$name ; \
192 testSAX $$i > $(srcdir)/SAXresult/$$name ; \
193 else \
194 echo Testing $$name ; \
195 testSAX $$i > result.$$name ; \
196 diff $(srcdir)/SAXresult/$$name result.$$name ; \
197 rm result.$$name ; \
198 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000199
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000200
Daniel Veillardb05deb71999-08-10 19:04:08 +0000201Validtests : tester
202 @echo "##"
203 @echo "## Validity checking regression tests"
204 @echo "##"
205 @(for i in $(srcdir)/test/VC/* ; do \
206 name=`basename $$i`; \
207 if [ ! -d $$i ] ; then \
208 if [ ! -f $(srcdir)/result/VC/$$name ] ; then \
209 echo New test file $$name ; \
210 tester --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \
211 else \
212 echo Testing $$name ; \
213 tester --noout --valid $$i 2> result.$$name ; \
214 diff $(srcdir)/result/VC/$$name result.$$name ; \
215 rm result.$$name ; \
216 fi ; fi ; done)
217 @echo "##"
218 @echo "## Valid documents regression tests"
219 @echo "##"
220 @(for i in $(srcdir)/test/valid/* ; do \
221 name=`basename $$i`; \
222 if [ ! -d $$i ] ; then \
223 if [ ! -f $(srcdir)/result/valid/$$name ] ; then \
224 echo New test file $$name ; \
225 tester --valid $$i > $(srcdir)/result/valid/$$name ; \
226 else \
227 echo Testing $$name ; \
228 tester --valid $$i > result.$$name ; \
229 diff $(srcdir)/result/valid/$$name result.$$name ; \
230 rm result.$$name ; \
231 fi ; fi ; done)
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000232
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000233dist-hook:
234 cp libxml.spec $(distdir)
235
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000236## We create xmlConf.sh here and not from configure because we want
237## to get the paths expanded correctly. Macros like srcdir are given
238## the value NONE in configure if the user doesn't specify them (this
239## is an autoconf feature, not a bug).
240
Daniel Veillardb556eb51999-08-15 17:19:50 +0000241confexecdir=$(libdir)
242confexec_DATA = xmlConf.sh
243
Elliot Lee56316b01999-08-23 18:18:32 +0000244CLEANFILES=xmlConf.sh
245
Daniel Veillardb556eb51999-08-15 17:19:50 +0000246EXTRA_DIST = xmlConf.sh.in
247
248confexecdir=$(libdir)
249confexec_DATA = xmlConf.sh
250EXTRA_DIST = xmlConf.sh.in libxml.spec.in test result SAXresult \
251 example/Makefile.am example/gjobread.c example/gjobs.xml
252
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000253xmlConf.sh: xmlConf.sh.in Makefile
254## Use sed and then mv to avoid problems if the user interrupts.
Miguel de Icaza60681bd1998-09-30 19:28:59 +0000255 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
256 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
257 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000258 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
259 && mv xmlConf.tmp xmlConf.sh