VirtualBox

source: vbox/trunk/src/libs/libxml2-2.13.2/Makefile.am@ 105764

最後變更 在這個檔案從105764是 105420,由 vboxsync 提交於 4 月 前

libxml2-2.12.6: Applied and adjusted our libxml2 changes to 2.12.6. bugref:10730

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette