1 | ## Process this file with automake to produce Makefile.in
|
---|
2 |
|
---|
3 | ACLOCAL_AMFLAGS = -I m4
|
---|
4 |
|
---|
5 | SUBDIRS = include . doc example xstc
|
---|
6 | if WITH_PYTHON
|
---|
7 | SUBDIRS += python
|
---|
8 | endif
|
---|
9 | if WITH_GLOB
|
---|
10 | SUBDIRS += fuzz
|
---|
11 | endif
|
---|
12 |
|
---|
13 | DIST_SUBDIRS = include . doc example fuzz python xstc
|
---|
14 |
|
---|
15 | AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include -DSYSCONFDIR='"$(sysconfdir)"'
|
---|
16 |
|
---|
17 | check_PROGRAMS = \
|
---|
18 | runsuite \
|
---|
19 | runtest \
|
---|
20 | runxmlconf \
|
---|
21 | testModule \
|
---|
22 | testThreads \
|
---|
23 | testapi \
|
---|
24 | testchar \
|
---|
25 | testdict \
|
---|
26 | testlimits \
|
---|
27 | testparser \
|
---|
28 | testrecurse
|
---|
29 |
|
---|
30 | bin_PROGRAMS = xmllint xmlcatalog
|
---|
31 |
|
---|
32 | bin_SCRIPTS = xml2-config
|
---|
33 |
|
---|
34 | lib_LTLIBRARIES = libxml2.la
|
---|
35 | libxml2_la_CFLAGS = $(AM_CFLAGS) $(XML_PRIVATE_CFLAGS)
|
---|
36 | libxml2_la_LIBADD = $(XML_PRIVATE_LIBS)
|
---|
37 |
|
---|
38 | libxml2_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined \
|
---|
39 | -version-info $(LIBXML_VERSION_INFO) \
|
---|
40 | $(MODULE_PLATFORM_LIBS)
|
---|
41 | if USE_VERSION_SCRIPT
|
---|
42 | libxml2_la_LDFLAGS += $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms
|
---|
43 | endif
|
---|
44 |
|
---|
45 | libxml2_la_SOURCES = buf.c chvalid.c dict.c entities.c encoding.c error.c \
|
---|
46 | globals.c hash.c list.c parser.c parserInternals.c \
|
---|
47 | SAX2.c threads.c tree.c uri.c valid.c xmlIO.c \
|
---|
48 | xmlmemory.c xmlstring.c
|
---|
49 | if WITH_C14N_SOURCES
|
---|
50 | libxml2_la_SOURCES += c14n.c
|
---|
51 | endif
|
---|
52 | if WITH_CATALOG_SOURCES
|
---|
53 | libxml2_la_SOURCES += catalog.c
|
---|
54 | endif
|
---|
55 | if WITH_DEBUG_SOURCES
|
---|
56 | libxml2_la_SOURCES += debugXML.c
|
---|
57 | endif
|
---|
58 | if WITH_FTP_SOURCES
|
---|
59 | libxml2_la_SOURCES += nanoftp.c
|
---|
60 | endif
|
---|
61 | if WITH_HTML_SOURCES
|
---|
62 | libxml2_la_SOURCES += HTMLparser.c HTMLtree.c
|
---|
63 | endif
|
---|
64 | if WITH_HTTP_SOURCES
|
---|
65 | libxml2_la_SOURCES += nanohttp.c
|
---|
66 | endif
|
---|
67 | if WITH_LEGACY_SOURCES
|
---|
68 | libxml2_la_SOURCES += legacy.c
|
---|
69 | if WITH_SAX1_SOURCES
|
---|
70 | libxml2_la_SOURCES += SAX.c
|
---|
71 | endif
|
---|
72 | endif
|
---|
73 | if WITH_LZMA_SOURCES
|
---|
74 | libxml2_la_SOURCES += xzlib.c
|
---|
75 | endif
|
---|
76 | if WITH_MODULES_SOURCES
|
---|
77 | libxml2_la_SOURCES += xmlmodule.c
|
---|
78 | endif
|
---|
79 | if WITH_OUTPUT_SOURCES
|
---|
80 | libxml2_la_SOURCES += xmlsave.c
|
---|
81 | endif
|
---|
82 | if WITH_PATTERN_SOURCES
|
---|
83 | libxml2_la_SOURCES += pattern.c
|
---|
84 | endif
|
---|
85 | if WITH_READER_SOURCES
|
---|
86 | libxml2_la_SOURCES += xmlreader.c
|
---|
87 | endif
|
---|
88 | if WITH_REGEXPS_SOURCES
|
---|
89 | libxml2_la_SOURCES += xmlregexp.c xmlunicode.c
|
---|
90 | endif
|
---|
91 | if WITH_SCHEMAS_SOURCES
|
---|
92 | libxml2_la_SOURCES += relaxng.c xmlschemas.c xmlschemastypes.c
|
---|
93 | if !WITH_XPATH_SOURCES
|
---|
94 | libxml2_la_SOURCES += xpath.c
|
---|
95 | endif
|
---|
96 | endif
|
---|
97 | if WITH_SCHEMATRON_SOURCES
|
---|
98 | libxml2_la_SOURCES += schematron.c
|
---|
99 | endif
|
---|
100 | if WITH_TRIO_SOURCES
|
---|
101 | libxml2_la_SOURCES += triostr.c trio.c
|
---|
102 | endif
|
---|
103 | if WITH_WRITER_SOURCES
|
---|
104 | libxml2_la_SOURCES += xmlwriter.c
|
---|
105 | endif
|
---|
106 | if WITH_XINCLUDE_SOURCES
|
---|
107 | libxml2_la_SOURCES += xinclude.c
|
---|
108 | endif
|
---|
109 | if WITH_XPATH_SOURCES
|
---|
110 | libxml2_la_SOURCES += xpath.c
|
---|
111 | endif
|
---|
112 | if WITH_XPTR_SOURCES
|
---|
113 | libxml2_la_SOURCES += xlink.c xpointer.c
|
---|
114 | endif
|
---|
115 |
|
---|
116 | DEPS = $(top_builddir)/libxml2.la
|
---|
117 | LDADDS = $(top_builddir)/libxml2.la
|
---|
118 |
|
---|
119 |
|
---|
120 | m4datadir = $(datadir)/aclocal
|
---|
121 | dist_m4data_DATA = libxml.m4
|
---|
122 |
|
---|
123 | runtest_SOURCES=runtest.c
|
---|
124 | runtest_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
|
---|
125 | runtest_DEPENDENCIES = $(DEPS)
|
---|
126 | runtest_LDADD= $(BASE_THREAD_LIBS) $(THREAD_LIBS) $(LDADDS)
|
---|
127 |
|
---|
128 | testrecurse_SOURCES=testrecurse.c
|
---|
129 | testrecurse_DEPENDENCIES = $(DEPS)
|
---|
130 | testrecurse_LDADD= $(LDADDS)
|
---|
131 |
|
---|
132 | testlimits_SOURCES=testlimits.c
|
---|
133 | testlimits_DEPENDENCIES = $(DEPS)
|
---|
134 | testlimits_LDADD= $(LDADDS)
|
---|
135 |
|
---|
136 | testchar_SOURCES=testchar.c
|
---|
137 | testchar_DEPENDENCIES = $(DEPS)
|
---|
138 | testchar_LDADD= $(LDADDS)
|
---|
139 |
|
---|
140 | testdict_SOURCES=testdict.c
|
---|
141 | testdict_DEPENDENCIES = $(DEPS)
|
---|
142 | testdict_LDADD= $(LDADDS)
|
---|
143 |
|
---|
144 | testparser_SOURCES=testparser.c
|
---|
145 | testparser_DEPENDENCIES = $(DEPS)
|
---|
146 | testparser_LDADD= $(LDADDS)
|
---|
147 |
|
---|
148 | runsuite_SOURCES=runsuite.c
|
---|
149 | runsuite_DEPENDENCIES = $(DEPS)
|
---|
150 | runsuite_LDADD= $(LDADDS)
|
---|
151 |
|
---|
152 | xmllint_SOURCES=xmllint.c
|
---|
153 | xmllint_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS)
|
---|
154 | xmllint_DEPENDENCIES = $(DEPS)
|
---|
155 | xmllint_LDADD= $(RDL_LIBS) $(LDADDS)
|
---|
156 |
|
---|
157 | xmlcatalog_SOURCES=xmlcatalog.c
|
---|
158 | xmlcatalog_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS)
|
---|
159 | xmlcatalog_DEPENDENCIES = $(DEPS)
|
---|
160 | xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
|
---|
161 |
|
---|
162 | testThreads_SOURCES = testThreads.c
|
---|
163 | testThreads_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
|
---|
164 | testThreads_DEPENDENCIES = $(DEPS)
|
---|
165 | testThreads_LDADD= $(BASE_THREAD_LIBS) $(THREAD_LIBS) $(LDADDS)
|
---|
166 |
|
---|
167 | testModule_SOURCES=testModule.c
|
---|
168 | testModule_DEPENDENCIES = $(DEPS)
|
---|
169 | testModule_LDADD= $(LDADDS)
|
---|
170 |
|
---|
171 | noinst_LTLIBRARIES = testdso.la
|
---|
172 | testdso_la_SOURCES = testdso.c
|
---|
173 | testdso_la_LDFLAGS = $(AM_LDFLAGS) \
|
---|
174 | -module -no-undefined -avoid-version -rpath $(libdir)
|
---|
175 |
|
---|
176 | # that one forces the rebuild when "make rebuild" is run on doc/
|
---|
177 | rebuild_testapi:
|
---|
178 | -@(if [ "$(PYTHON)" != "" ] ; then \
|
---|
179 | $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi )
|
---|
180 |
|
---|
181 | testapi_SOURCES=testapi.c
|
---|
182 | testapi_DEPENDENCIES = $(DEPS)
|
---|
183 | testapi_LDADD= $(LDADDS)
|
---|
184 |
|
---|
185 | runxmlconf_SOURCES=runxmlconf.c
|
---|
186 | runxmlconf_DEPENDENCIES = $(DEPS)
|
---|
187 | runxmlconf_LDADD= $(LDADDS)
|
---|
188 |
|
---|
189 | #testOOM_SOURCES=testOOM.c testOOMlib.h testOOMlib.c
|
---|
190 | #testOOM_DEPENDENCIES = $(DEPS)
|
---|
191 | #testOOM_LDADD= $(LDADDS)
|
---|
192 |
|
---|
193 | check-local:
|
---|
194 | [ -d test ] || $(LN_S) $(srcdir)/test .
|
---|
195 | [ -d result ] || $(LN_S) $(srcdir)/result .
|
---|
196 | $(CHECKER) ./runtest$(EXEEXT)
|
---|
197 | $(CHECKER) ./testrecurse$(EXEEXT)
|
---|
198 | $(CHECKER) ./testapi$(EXEEXT)
|
---|
199 | $(CHECKER) ./testchar$(EXEEXT)
|
---|
200 | $(CHECKER) ./testdict$(EXEEXT)
|
---|
201 | $(CHECKER) ./testparser$(EXEEXT)
|
---|
202 | $(CHECKER) ./testModule$(EXEEXT)
|
---|
203 | $(CHECKER) ./testThreads$(EXEEXT)
|
---|
204 | $(CHECKER) ./runxmlconf$(EXEEXT)
|
---|
205 | $(CHECKER) ./runsuite$(EXEEXT)
|
---|
206 |
|
---|
207 | # Compatibility name of the check target
|
---|
208 | runtests: check
|
---|
209 |
|
---|
210 | check-valgrind valgrind:
|
---|
211 | @echo '## Running the regression tests under Valgrind'
|
---|
212 | @echo '## Go get a cup of coffee it is gonna take a while ...'
|
---|
213 | $(MAKE) CHECKER='valgrind -q' check
|
---|
214 |
|
---|
215 | asan:
|
---|
216 | @echo '## rebuilding for ASAN'
|
---|
217 | ./configure CFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" CXXFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" LDFLAGS="-fsanitize=address,undefined" CC="clang" CXX="clang++" --disable-shared ; OptimOff ; $(MAKE) clean ; $(MAKE)
|
---|
218 |
|
---|
219 | # Old test suite. This should be ported to C.
|
---|
220 |
|
---|
221 | OLD_TESTS = Timingtests
|
---|
222 | if WITH_CATALOG_SOURCES
|
---|
223 | OLD_TESTS += Catatests
|
---|
224 | endif
|
---|
225 | if WITH_DEBUG_SOURCES
|
---|
226 | OLD_TESTS += Scripttests
|
---|
227 | endif
|
---|
228 | if WITH_SCHEMAS_SOURCES
|
---|
229 | if WITH_PYTHON
|
---|
230 | OLD_TESTS += RelaxNGPythonTests SchemasPythonTests
|
---|
231 | endif
|
---|
232 | endif
|
---|
233 | if WITH_SCHEMATRON_SOURCES
|
---|
234 | OLD_TESTS += Schematrontests
|
---|
235 | endif
|
---|
236 | if WITH_VALID_SOURCES
|
---|
237 | OLD_TESTS += VTimingtests
|
---|
238 | endif
|
---|
239 |
|
---|
240 | tests: $(OLD_TESTS)
|
---|
241 |
|
---|
242 | Scripttests : xmllint$(EXEEXT)
|
---|
243 | @echo "## Scripts regression tests"
|
---|
244 | @echo "## Some of the base computations may be different if srcdir != ."
|
---|
245 | -@(for i in $(srcdir)/test/scripts/*.script ; do \
|
---|
246 | name=`basename $$i .script`; \
|
---|
247 | xml=$(srcdir)/test/scripts/`basename $$i .script`.xml; \
|
---|
248 | if [ -f $$xml ] ; then \
|
---|
249 | if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \
|
---|
250 | echo New test file $$name ; \
|
---|
251 | $(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > $(srcdir)/result/scripts/$$name 2> $(srcdir)/result/scripts/$$name.err ; \
|
---|
252 | else \
|
---|
253 | log=`$(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > result.$$name 2> result.$$name.err ; \
|
---|
254 | diff $(srcdir)/result/scripts/$$name result.$$name ; \
|
---|
255 | diff $(srcdir)/result/scripts/$$name.err result.$$name.err` ; \
|
---|
256 | if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
|
---|
257 | rm result.$$name result.$$name.err ; \
|
---|
258 | fi ; fi ; done)
|
---|
259 |
|
---|
260 | Catatests : xmlcatalog$(EXEEXT)
|
---|
261 | @echo "## Catalog regression tests"
|
---|
262 | -@(for i in $(srcdir)/test/catalogs/*.script ; do \
|
---|
263 | name=`basename $$i .script`; \
|
---|
264 | xml=$(srcdir)/test/catalogs/`basename $$i .script`.xml; \
|
---|
265 | if [ -f $$xml ] ; then \
|
---|
266 | if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
|
---|
267 | echo New test file $$name ; \
|
---|
268 | $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
|
---|
269 | else \
|
---|
270 | log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
|
---|
271 | diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
|
---|
272 | if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
|
---|
273 | rm result.$$name ; \
|
---|
274 | fi ; fi ; done)
|
---|
275 | -@(for i in $(srcdir)/test/catalogs/*.script ; do \
|
---|
276 | name=`basename $$i .script`; \
|
---|
277 | sgml=$(srcdir)/test/catalogs/`basename $$i .script`.sgml; \
|
---|
278 | if [ -f $$sgml ] ; then \
|
---|
279 | if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
|
---|
280 | echo New test file $$name ; \
|
---|
281 | $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \
|
---|
282 | else \
|
---|
283 | log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \
|
---|
284 | diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
|
---|
285 | if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
|
---|
286 | rm result.$$name ; \
|
---|
287 | fi ; fi ; done)
|
---|
288 | @echo "## Add and del operations on XML Catalogs"
|
---|
289 | -@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout $(srcdir)/result/catalogs/mycatalog; \
|
---|
290 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid sysid $(srcdir)/result/catalogs/mycatalog; \
|
---|
291 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid2 sysid2 $(srcdir)/result/catalogs/mycatalog; \
|
---|
292 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid3 sysid3 $(srcdir)/result/catalogs/mycatalog; \
|
---|
293 | diff result/catalogs/mycatalog.full $(srcdir)/result/catalogs/mycatalog; \
|
---|
294 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid $(srcdir)/result/catalogs/mycatalog; \
|
---|
295 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid3 $(srcdir)/result/catalogs/mycatalog; \
|
---|
296 | $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid2 $(srcdir)/result/catalogs/mycatalog; \
|
---|
297 | diff result/catalogs/mycatalog.empty $(srcdir)/result/catalogs/mycatalog; \
|
---|
298 | rm -f $(srcdir)/result/catalogs/mycatalog)
|
---|
299 |
|
---|
300 | dba100000.xml: dbgenattr.pl
|
---|
301 | @echo "## generating dba100000.xml"
|
---|
302 | @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > dba100000.xml)
|
---|
303 |
|
---|
304 | Timingtests: xmllint$(EXEEXT) dba100000.xml
|
---|
305 | @echo "## Timing tests to try to detect performance"
|
---|
306 | @echo "## as well a memory usage breakage when streaming"
|
---|
307 | @echo "## 1/ using the file interface"
|
---|
308 | @echo "## 2/ using the memory interface"
|
---|
309 | @echo "## 3/ repeated DOM parsing"
|
---|
310 | @echo "## 4/ repeated DOM validation"
|
---|
311 | -@($(top_builddir)/xmllint --stream --timing dba100000.xml; \
|
---|
312 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
|
---|
313 | exit 0)
|
---|
314 | -@($(top_builddir)/xmllint --stream --timing --memory dba100000.xml; \
|
---|
315 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
|
---|
316 | exit 0)
|
---|
317 | -@($(top_builddir)/xmllint --noout --timing --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
|
---|
318 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
|
---|
319 | exit 0)
|
---|
320 |
|
---|
321 | VTimingtests: xmllint$(EXEEXT)
|
---|
322 | -@($(top_builddir)/xmllint --noout --timing --valid --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
|
---|
323 | if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
|
---|
324 | exit 0)
|
---|
325 |
|
---|
326 | Schematrontests: xmllint$(EXEEXT)
|
---|
327 | @echo "## Schematron regression tests"
|
---|
328 | -@(for i in $(srcdir)/test/schematron/*.sct ; do \
|
---|
329 | name=`basename $$i | sed 's+\.sct++'`; \
|
---|
330 | for j in $(srcdir)/test/schematron/"$$name"_*.xml ; do \
|
---|
331 | if [ -f $$j ] ; then \
|
---|
332 | xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
|
---|
333 | if [ ! -f $(srcdir)/result/schematron/"$$name"_"$$xno" ]; \
|
---|
334 | then \
|
---|
335 | echo New test file "$$name"_"$$xno" ; \
|
---|
336 | $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
|
---|
337 | > $(srcdir)/result/schematron/"$$name"_"$$xno" \
|
---|
338 | 2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \
|
---|
339 | else \
|
---|
340 | log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
|
---|
341 | > res.$$name 2> err.$$name;\
|
---|
342 | diff $(srcdir)/result/schematron/"$$name"_"$$xno" \
|
---|
343 | res.$$name;\
|
---|
344 | diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \
|
---|
345 | err.$$name | grep -v "error detected at";\
|
---|
346 | grep Unimplemented err.$$name`; \
|
---|
347 | if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo "$$log" ; fi ; \
|
---|
348 | rm res.$$name err.$$name ; \
|
---|
349 | fi ; fi ; \
|
---|
350 | done; done)
|
---|
351 |
|
---|
352 | RelaxNGPythonTests:
|
---|
353 | @(if [ -x $(PYTHON) ] ; then \
|
---|
354 | PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \
|
---|
355 | export PYTHONPATH; \
|
---|
356 | LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
|
---|
357 | export LD_LIBRARY_PATH; \
|
---|
358 | echo "## Relax-NG Python based test suite 1" ; \
|
---|
359 | $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \
|
---|
360 | echo "## Relax-NG Python based test suite 2" ; \
|
---|
361 | $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite2.py ; \
|
---|
362 | fi)
|
---|
363 |
|
---|
364 | SchemasPythonTests:
|
---|
365 | @(if [ -x $(PYTHON) ] ; then \
|
---|
366 | PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \
|
---|
367 | export PYTHONPATH; \
|
---|
368 | LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
|
---|
369 | export LD_LIBRARY_PATH; \
|
---|
370 | echo "## XML Schemas datatypes Python based test suite" ; \
|
---|
371 | echo "## It is normal to see 11 errors reported" ; \
|
---|
372 | $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
|
---|
373 | fi)
|
---|
374 | @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi)
|
---|
375 |
|
---|
376 | cleanup:
|
---|
377 | -@(find . -name .\#\* -exec rm {} \;)
|
---|
378 | -@(find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;)
|
---|
379 | -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm -f {} \;)
|
---|
380 |
|
---|
381 | dist-hook: cleanup
|
---|
382 | (cd $(srcdir) ; tar -cf - --exclude .git win32 os400 vms test result) | (cd $(distdir); tar xf -)
|
---|
383 |
|
---|
384 | CLEANFILES = runsuite.log runxmlconf.log test.out *.gcda *.gcno *.res
|
---|
385 | DISTCLEANFILES = COPYING missing.lst
|
---|
386 |
|
---|
387 | EXTRA_DIST = Copyright check-xml-test-suite.py gentest.py \
|
---|
388 | check-relaxng-test-suite.py check-relaxng-test-suite2.py \
|
---|
389 | check-xsddata-test-suite.py check-xinclude-test-suite.py \
|
---|
390 | example/Makefile.am example/gjobread.c example/gjobs.xml \
|
---|
391 | libxml2-config.cmake.in autogen.sh \
|
---|
392 | trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
|
---|
393 | triop.h triodef.h libxml.h \
|
---|
394 | genUnicode.py \
|
---|
395 | dbgen.pl dbgenattr.pl \
|
---|
396 | libxml2.syms timsort.h \
|
---|
397 | README.zOS README.md \
|
---|
398 | CMakeLists.txt config.h.cmake.in libxml2-config.cmake.cmake.in
|
---|
399 |
|
---|
400 |
|
---|
401 | pkgconfigdir = $(libdir)/pkgconfig
|
---|
402 | pkgconfig_DATA = libxml-2.0.pc
|
---|
403 |
|
---|
404 | cmakedir = $(libdir)/cmake/libxml2
|
---|
405 | cmake_DATA = libxml2-config.cmake
|
---|
406 |
|
---|
407 | #
|
---|
408 | # Install the tests program sources as examples
|
---|
409 | #
|
---|
410 | examplesdir = $(docdir)/examples
|
---|
411 | examples_DATA = xmllint.c
|
---|
412 |
|
---|
413 | tst: tst.c
|
---|
414 | $(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz -llzma
|
---|
415 |
|
---|
416 | sparse: clean
|
---|
417 | $(MAKE) CC=cgcc
|
---|
418 |
|
---|
419 | #
|
---|
420 | # Coverage support, largely borrowed from libvirt
|
---|
421 | # Both binaries comes from the lcov package in Fedora
|
---|
422 | #
|
---|
423 | LCOV = /usr/bin/lcov
|
---|
424 | GENHTML = /usr/bin/genhtml
|
---|
425 |
|
---|
426 | cov: clean-cov
|
---|
427 | if [ "`echo $(AM_LDFLAGS) | grep coverage`" = "" ] ; then \
|
---|
428 | echo not configured with coverage; exit 1 ; fi
|
---|
429 | if [ ! -x $(LCOV) -o ! -x $(GENHTML) ] ; then \
|
---|
430 | echo Need $(LCOV) and $(GENHTML) excecutables; exit 1 ; fi
|
---|
431 | -@($(MAKE) check)
|
---|
432 | -@(./runsuite$(EXEEXT))
|
---|
433 | mkdir $(top_builddir)/coverage
|
---|
434 | $(LCOV) -c -o $(top_builddir)/coverage/libxml2.info.tmp -d $(top_srcdir)
|
---|
435 | $(LCOV) -r $(top_builddir)/coverage/libxml2.info.tmp -o $(top_builddir)/coverage/libxml2.info *usr*
|
---|
436 | rm $(top_builddir)/coverage/libxml2.info.tmp
|
---|
437 | $(GENHTML) -s -t "libxml2" -o $(top_builddir)/coverage --legend $(top_builddir)/coverage/libxml2.info
|
---|
438 | echo "Coverage report is in $(top_builddir)/coverage/index.html"
|
---|
439 |
|
---|
440 | clean-cov:
|
---|
441 | rm -rf $(top_builddir)/coverage
|
---|
442 |
|
---|