Makefile.am revision 8e199906802c79c9abd4690d8fd52c145134e31f
1## Process this file with automake to produce Makefile.in 2 3SUBDIRS = . include doc example 4 5INCLUDES = -I@srcdir@/include -I./include @Z_CFLAGS@ @CORBA_CFLAGS@ 6 7noinst_PROGRAMS=testSAX testHTML testXPath testURI 8 9bin_PROGRAMS = xmllint 10 11bin_SCRIPTS=xml-config 12 13lib_LTLIBRARIES = libxml.la 14libxml_la_LIBADD = @Z_LIBS@ 15 16libxml_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@ 17 18libxml_la_SOURCES = \ 19 SAX.c \ 20 entities.c \ 21 encoding.c \ 22 error.c \ 23 parserInternals.c \ 24 parser.c \ 25 tree.c \ 26 hash.c \ 27 xmlIO.c \ 28 xmlmemory.c \ 29 uri.c \ 30 valid.c \ 31 xlink.c \ 32 HTMLparser.c \ 33 HTMLtree.c \ 34 debugXML.c \ 35 xpath.c \ 36 xpointer.c \ 37 xinclude.c \ 38 nanohttp.c \ 39 nanoftp.c 40 41DEPS = $(top_builddir)/libxml.la 42LDADDS = $(top_builddir)/libxml.la @Z_LIBS@ @M_LIBS@ 43 44man_MANS = xmllint.1 xml-config.1 libxml.4 45 46m4datadir = $(datadir)/aclocal 47m4data_DATA = libxml.m4 48 49xmllint_SOURCES=xmllint.c 50xmllint_LDFLAGS = 51xmllint_DEPENDENCIES = $(DEPS) 52xmllint_LDADD= @RDL_LIBS@ $(LDADDS) 53 54testSAX_SOURCES=testSAX.c 55testSAX_LDFLAGS = 56testSAX_DEPENDENCIES = $(DEPS) 57testSAX_LDADD= $(LDADDS) 58 59testHTML_SOURCES=testHTML.c 60testHTML_LDFLAGS = 61testHTML_DEPENDENCIES = $(DEPS) 62testHTML_LDADD= $(LDADDS) 63 64testXPath_SOURCES=testXPath.c 65testXPath_LDFLAGS = 66testXPath_DEPENDENCIES = $(DEPS) 67testXPath_LDADD= $(LDADDS) 68 69testURI_SOURCES=testURI.c 70testURI_LDFLAGS = 71testURI_DEPENDENCIES = $(DEPS) 72testURI_LDADD= $(LDADDS) 73 74check-local: tests 75 76$(srcdir)/libxml: 77 -$(RM) $(srcdir)/libxml 78 ln -s $(srcdir)/. $(srcdir)/libxml 79 80install-data: $(srcdir)/libxml 81 82$(libxml_la_SOURCES): $(srcdir)/libxml 83 84testall : tests SVGtests SAXtests 85 86tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests 87 88HTMLtests : testHTML 89 @(rm -f .memdump ; touch .memdump) 90 @echo "##" 91 @echo "## HTML regression tests" 92 @echo "##" 93 @(for i in $(srcdir)/test/HTML/* ; do \ 94 name=`basename $$i`; \ 95 if [ ! -d $$i ] ; then \ 96 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ 97 echo New test file $$name ; \ 98 $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \ 99 else \ 100 echo Testing $$name ; \ 101 $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \ 102 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ 103 diff $(srcdir)/result/HTML/$$name result.$$name ; \ 104 diff -b $(srcdir)/result/HTML/$$name.err error.$$name ; \ 105 $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \ 106 diff result.$$name result2.$$name ; \ 107 rm result.$$name result2.$$name error.$$name ; \ 108 fi ; fi ; done) 109 @echo "##" 110 @echo "## Push HTML regression tests" 111 @echo "##" 112 @(for i in $(srcdir)/test/HTML/* ; do \ 113 name=`basename $$i`; \ 114 if [ ! -d $$i ] ; then \ 115 if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \ 116 echo New test file $$name ; \ 117 $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \ 118 else \ 119 echo Testing $$name ; \ 120 $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \ 121 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ 122 diff $(srcdir)/result/HTML/$$name result.$$name ; \ 123 cut -b 1-15 $(srcdir)/result/HTML/$$name.err > errorcut.$$name; \ 124 cut -b 1-15 error.$$name > errorcut2.$$name; \ 125 diff -b errorcut.$$name errorcut2.$$name ; \ 126 $(top_builddir)/testHTML --push result.$$name > result2.$$name 2>error.$$name ; \ 127 diff result.$$name result2.$$name ; \ 128 rm result.$$name result2.$$name error.$$name errorcut.$$name errorcut2.$$name ; \ 129 fi ; fi ; done) 130 @echo "##" 131 @echo "## HTML SAX regression tests" 132 @echo "##" 133 @(for i in $(srcdir)/test/HTML/* ; do \ 134 name=`basename $$i`; \ 135 if [ ! -d $$i ] ; then \ 136 if [ ! -f $(srcdir)/result/HTML/$$name.sax ] ; then \ 137 echo New test file $$name ; \ 138 $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \ 139 else \ 140 echo Testing $$name ; \ 141 $(top_builddir)/testHTML --sax $$i > result.$$name.sax ; \ 142 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ 143 diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax ; \ 144 rm result.$$name.sax ; \ 145 fi ; fi ; done) 146 @echo "##" 147 @echo "## Push HTML SAX 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 $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \ 155 else \ 156 echo Testing $$name ; \ 157 $(top_builddir)/testHTML --push --sax $$i > result.$$name.sax ; \ 158 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ 159 diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax ; \ 160 rm result.$$name.sax ; \ 161 fi ; fi ; done) 162 163 164XMLtests : xmllint 165 @(rm -f .memdump ; touch .memdump) 166 @echo "##" 167 @echo "## XML regression tests" 168 @echo "##" 169 @(for i in $(srcdir)/test/* ; do \ 170 name=`basename $$i`; \ 171 if [ ! -d $$i ] ; then \ 172 if [ ! -f $(srcdir)/result/$$name ] ; then \ 173 echo New test file $$name ; \ 174 $(top_builddir)/xmllint $$i > $(srcdir)/result/$$name ; \ 175 else \ 176 echo Testing $$name ; \ 177 $(top_builddir)/xmllint $$i > result.$$name ; \ 178 diff $(srcdir)/result/$$name result.$$name ; \ 179 $(top_builddir)/xmllint result.$$name > result2.$$name ; \ 180 diff result.$$name result2.$$name ; \ 181 rm result.$$name result2.$$name ; \ 182 fi ; fi ; done) 183 @echo "##" 184 @echo "## XML regression tests on memory" 185 @echo "##" 186 @(for i in $(srcdir)/test/* ; do \ 187 name=`basename $$i`; \ 188 if [ ! -d $$i ] ; then \ 189 if [ ! -f $(srcdir)/result/$$name ] ; then \ 190 echo New test file $$name ; \ 191 $(top_builddir)/xmllint --memory $$i > $(srcdir)/result/$$name ; \ 192 else \ 193 echo Testing $$name ; \ 194 $(top_builddir)/xmllint --memory $$i > result.$$name ; \ 195 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ 196 diff $(srcdir)/result/$$name result.$$name ; \ 197 $(top_builddir)/xmllint --memory result.$$name > result2.$$name ; \ 198 diff result.$$name result2.$$name ; \ 199 rm result.$$name result2.$$name ; \ 200 fi ; fi ; done) 201 202XMLenttests : xmllint 203 @(rm -f .memdump ; touch .memdump) 204 @echo "##" 205 @echo "## XML entity subst regression tests" 206 @echo "##" 207 @(for i in $(srcdir)/test/* ; do \ 208 name=`basename $$i`; \ 209 if [ ! -d $$i ] ; then \ 210 if [ ! -f $(srcdir)/result/noent/$$name ] ; then \ 211 echo New test file $$name ; \ 212 $(top_builddir)/xmllint --noent $$i > $(srcdir)/result/noent/$$name ; \ 213 else \ 214 echo Testing $$name ; \ 215 $(top_builddir)/xmllint --noent $$i > result.$$name ; \ 216 diff $(srcdir)/result/noent/$$name result.$$name ; \ 217 $(top_builddir)/xmllint --noent result.$$name > result2.$$name ; \ 218 diff result.$$name result2.$$name ; \ 219 rm result.$$name result2.$$name ; \ 220 fi ; fi ; done) 221 222URItests : testURI 223 @(rm -f .memdump ; touch .memdump) 224 @echo "##" 225 @echo "## URI module regression tests" 226 @echo "##" 227 @(for i in $(srcdir)/test/URI/*.data ; do \ 228 name=`basename $$i`; \ 229 if [ ! -d $$i ] ; then \ 230 if [ ! -f $(srcdir)/result/URI/$$name ] ; then \ 231 echo New test file $$name ; \ 232 $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > $(srcdir)/result/URI/$$name ; \ 233 else \ 234 echo Testing $$name ; \ 235 $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > result.$$name ; \ 236 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ 237 diff $(srcdir)/result/URI/$$name result.$$name ; \ 238 rm result.$$name ; \ 239 fi ; fi ; done) 240 241XPathtests : testXPath 242 @echo "##" 243 @echo "## XPath regression tests" 244 @echo "##" 245 @(for i in $(srcdir)/test/XPath/expr/* ; do \ 246 name=`basename $$i`; \ 247 if [ ! -d $$i ] ; then \ 248 if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \ 249 echo New test file $$name ; \ 250 $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \ 251 else \ 252 echo Testing $$name ; \ 253 $(top_builddir)/testXPath -f --expr $$i > result.$$name ; \ 254 diff $(srcdir)/result/XPath/expr/$$name result.$$name ; \ 255 rm result.$$name ; \ 256 fi ; fi ; done) 257 @(for i in $(srcdir)/test/XPath/docs/* ; do \ 258 if [ ! -d $$i ] ; then \ 259 doc=`basename $$i`; \ 260 for j in $(srcdir)/test/XPath/tests/$$doc* ; do \ 261 if [ ! -f $$j ] ; then continue ; fi ; \ 262 name=`basename $$j`; \ 263 if [ ! -d $$j ] ; then \ 264 if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \ 265 echo New test file $$name ; \ 266 $(top_builddir)/testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \ 267 else \ 268 echo Testing $$name ; \ 269 $(top_builddir)/testXPath -f -i $$i $$j > result.$$name ; \ 270 diff $(srcdir)/result/XPath/tests/$$name result.$$name ; \ 271 rm result.$$name ; \ 272 fi ; fi ; done ; fi ; done) 273 274XPtrtests : testXPath 275 @(rm -f .memdump ; touch .memdump) 276 @echo "##" 277 @echo "## XPointer regression tests" 278 @echo "##" 279 @(for i in $(srcdir)/test/XPath/docs/* ; do \ 280 if [ ! -d $$i ] ; then \ 281 doc=`basename $$i`; \ 282 for j in $(srcdir)/test/XPath/xptr/$$doc* ; do \ 283 if [ ! -f $$j ] ; then continue ; fi ; \ 284 name=`basename $$j`; \ 285 if [ ! -d $$j ] ; then \ 286 if [ ! -f $(srcdir)/result/XPath/xptr/$$name ] ; then \ 287 echo New test file $$name ; \ 288 ./testXPath -xptr -f -i $$i $$j > $(srcdir)/result/XPath/xptr/$$name ; \ 289 else \ 290 echo Testing $$name ; \ 291 ./testXPath -xptr -f -i $$i $$j > result.$$name ; \ 292 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ 293 diff $(srcdir)/result/XPath/xptr/$$name result.$$name ; \ 294 rm result.$$name ; \ 295 fi ; fi ; done ; fi ; done) 296 297XIncludetests : xmllint 298 @echo "##" 299 @echo "## XInclude regression tests" 300 @echo "##" 301 @(for i in $(srcdir)/test/XInclude/docs/* ; do \ 302 name=`basename $$i`; \ 303 if [ ! -d $$i ] ; then \ 304 if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \ 305 echo New test file $$name ; \ 306 $(top_builddir)/xmllint --xinclude $$i > $(srcdir)/result/XInclude/$$name ; \ 307 else \ 308 echo Testing $$name ; \ 309 $(top_builddir)/xmllint --xinclude $$i > result.$$name ; \ 310 grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ 311 diff $(srcdir)/result/XInclude/$$name result.$$name ; \ 312 rm result.$$name ; \ 313 fi ; fi ; done) 314 315SVGtests : xmllint 316 @echo "##" 317 @echo "## SVG parsing regression tests" 318 @echo "##" 319 @(for i in $(srcdir)/test/SVG/* ; do \ 320 name=`basename $$i`; \ 321 if [ ! -d $$i ] ; then \ 322 if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \ 323 echo New test file $$name ; \ 324 $(top_builddir)/xmllint $$i > $(srcdir)/result/SVG/$$name ; \ 325 else \ 326 echo Testing $$name ; \ 327 $(top_builddir)/xmllint $$i > result.$$name ; \ 328 diff $(srcdir)/result/SVG/$$name result.$$name ; \ 329 $(top_builddir)/xmllint result.$$name > result2.$$name ; \ 330 diff result.$$name result2.$$name ; \ 331 rm result.$$name result2.$$name ; \ 332 fi ; fi ; done) 333 334SAXtests : testSAX 335 @echo "##" 336 @echo "## SAX callbacks regression tests" 337 @echo "##" 338 @(for i in $(srcdir)/test/* ; do \ 339 name=`basename $$i`; \ 340 if [ ! -d $$i ] ; then \ 341 if [ ! -f $(srcdir)/SAXresult/$$name ] ; then \ 342 echo New test file $$name ; \ 343 $(top_builddir)/testSAX $$i > $(srcdir)/SAXresult/$$name ; \ 344 else \ 345 echo Testing $$name ; \ 346 $(top_builddir)/testSAX $$i > result.$$name ; \ 347 diff $(srcdir)/SAXresult/$$name result.$$name ; \ 348 rm result.$$name ; \ 349 fi ; fi ; done) 350 351 352Validtests : xmllint 353 @echo "##" 354 @echo "## Validity checking regression tests" 355 @echo "##" 356 @(for i in $(srcdir)/test/VC/* ; do \ 357 name=`basename $$i`; \ 358 if [ ! -d $$i ] ; then \ 359 if [ ! -f $(srcdir)/result/VC/$$name ] ; then \ 360 echo New test file $$name ; \ 361 $(top_builddir)/xmllint --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \ 362 else \ 363 echo Testing $$name ; \ 364 $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \ 365 diff $(srcdir)/result/VC/$$name result.$$name ; \ 366 rm result.$$name ; \ 367 fi ; fi ; done) 368 @echo "##" 369 @echo "## Valid documents regression tests" 370 @echo "##" 371 @(for i in $(srcdir)/test/valid/* ; do \ 372 name=`basename $$i`; \ 373 if [ ! -d $$i ] ; then \ 374 if [ ! -f $(srcdir)/result/valid/$$name ] ; then \ 375 echo New test file $$name ; \ 376 $(top_builddir)/xmllint --valid $$i > $(srcdir)/result/valid/$$name 2>$(srcdir)/result/valid/$$name.err ; \ 377 else \ 378 echo Testing $$name ; \ 379 $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \ 380 diff $(srcdir)/result/valid/$$name result.$$name ; \ 381 diff $(srcdir)/result/valid/$$name.err error.$$name ; \ 382 rm result.$$name error.$$name ; \ 383 fi ; fi ; done) 384 385dist-hook: libxml.spec 386 -cp libxml.spec $(distdir) 387 (cd $(srcdir) ; tar -cf - --exclude CVS test result SAXresult ) | (cd $(distdir); tar xf -) 388 389cleantar: 390 @(rm -f libxslt*.tar.gz) 391 392rpm: cleantar distcheck 393 rpm -ta $(distdir).tar.gz 394 395## We create xmlConf.sh here and not from configure because we want 396## to get the paths expanded correctly. Macros like srcdir are given 397## the value NONE in configure if the user doesn't specify them (this 398## is an autoconf feature, not a bug). 399 400confexecdir=$(libdir) 401confexec_DATA = xmlConf.sh 402 403CLEANFILES=xmlConf.sh 404 405confexecdir=$(libdir) 406confexec_DATA = xmlConf.sh 407EXTRA_DIST = xmlConf.sh.in libxml.spec.in libxml.spec libxml.m4 \ 408 example/Makefile.am example/gjobread.c example/gjobs.xml \ 409 $(man_MANS) libxml-2.0.pc.in xmlversion.h.in \ 410 win32/README.MSDev win32/Makefile.mingw \ 411 win32/libxml2/libxml2.dsp win32/libxml2/libxml2_so.dsp \ 412 win32/libxml2/libxml2_a.dsp vms/build_libxml.com vms/config.vms 413 414pkgconfigdir = $(libdir)/pkgconfig 415pkgconfig_DATA = libxml-2.0.pc 416 417xmlConf.sh: xmlConf.sh.in Makefile 418## Use sed and then mv to avoid problems if the user interrupts. 419 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \ 420 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \ 421 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \ 422 -e 's?\@VERSION\@?$(VERSION)?g' \ 423 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \ 424 && mv xmlConf.tmp xmlConf.sh 425