3 # ___\ \/ /_ __ __ _| |_
4 # / _ \\ /| '_ \ / _` | __|
5 # | __// \| |_) | (_| | |_
6 # \___/_/\_\ .__/ \__,_|\__|
9 # Copyright (c) 2017-2021 Sebastian Pipping <sebastian@pipping.org>
10 # Copyright (c) 2018 KangLin <kl222@126.com>
11 # Licensed under the MIT license:
13 # Permission is hereby granted, free of charge, to any person obtaining
14 # a copy of this software and associated documentation files (the
15 # "Software"), to deal in the Software without restriction, including
16 # without limitation the rights to use, copy, modify, merge, publish,
17 # distribute, sublicense, and/or sell copies of the Software, and to permit
18 # persons to whom the Software is furnished to do so, subject to the
19 # following conditions:
21 # The above copyright notice and this permission notice shall be included
22 # in all copies or substantial portions of the Software.
24 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
27 # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
28 # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
29 # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
30 # USE OR OTHER DEALINGS IN THE SOFTWARE.
39 ACLOCAL_AMFLAGS = -I m4
40 LIBTOOLFLAGS = --verbose
42 SUBDIRS = lib # lib goes first to build first
53 pkgconfig_DATA = expat.pc
54 pkgconfigdir = $(libdir)/pkgconfig
58 cmake/autotools/expat.cmake
61 cmake/autotools/expat-config-version.cmake \
62 cmake/autotools/expat-noconfig.cmake \
63 cmake/expat-config.cmake
65 cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@
69 cmake/autotools/expat-noconfig__linux.cmake.in \
70 cmake/autotools/expat-noconfig__macos.cmake.in \
71 cmake/autotools/expat-noconfig__windows.cmake.in \
72 cmake/autotools/expat-package-init.cmake \
73 cmake/mingw-toolchain.cmake \
77 ConfigureChecks.cmake \
80 _EXTRA_DIST_WINDOWS = \
81 win32/build_expat_iss.bat \
87 $(_EXTRA_DIST_CMAKE) \
88 $(_EXTRA_DIST_WINDOWS) \
91 conftools/get-version.sh \
93 xmlwf/xmlwf_helpgen.py \
94 xmlwf/xmlwf_helpgen.sh \
100 test-driver-wrapper.sh
105 @echo 'ERROR: Running "make buildlib LIBRARY=libexpatw.la"' >&2
106 @echo 'ERROR: is no longer supported. INSTEAD please:' >&2
108 @echo 'ERROR: * Mass-patch Makefile.am, e.g.' >&2
109 @echo 'ERROR: # find -name Makefile.am -exec sed \' >&2
110 @echo 'ERROR: -e "s,libexpat\.la,libexpatw.la," \' >&2
111 @echo 'ERROR: -e "s,libexpat_la,libexpatw_la," \' >&2
112 @echo 'ERROR: -i {} +' >&2
114 @echo 'ERROR: * Run automake to re-generate Makefile.in files' >&2
116 @echo 'ERROR: * Use "./configure --without-xmlwf" and/or' >&2
117 @echo 'ERROR: "make -C lib all install" to bypass compilation' >&2
118 @echo 'ERROR: of xmlwf (e.g. with -DXML_UNICODE)' >&2
123 .PHONY: run-benchmark
125 $(MAKE) -C tests/benchmark
126 ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
128 .PHONY: download-xmlts-zip
130 if test "$(XMLTS_ZIP)" = ""; then \
131 wget --output-document=tests/xmlts.zip \
132 https://www.w3.org/XML/Test/xmlts20080827.zip; \
134 cp $(XMLTS_ZIP) tests/xmlts.zip; \
138 $(MAKE) download-xmlts-zip
140 .PHONY: extract-xmlts-zip
141 extract-xmlts-zip: tests/xmlts.zip
142 [ -f $(builddir)/tests/xmlts.zip ] || $(MAKE) download-xmlts-zip # vpath workaround
143 cd tests && unzip -q xmlts.zip
145 tests/xmlconf: tests/xmlts.zip
146 $(MAKE) extract-xmlts-zip
149 run-xmltest: tests/xmlconf
151 [ -d $(builddir)/tests/xmlconf ] || $(MAKE) extract-xmlts-zip # vpath workaround
154 $(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log
155 $(srcdir)/fix-xmltest-log.sh $(builddir)/tests/xmltest.log
156 diff -u $(srcdir)/tests/xmltest.log.expected $(builddir)/tests/xmltest.log
158 @echo 'ERROR: xmlwf is needed for "make run-xmltest".' >&2
159 @echo 'ERROR: Please re-configure without --without-xmlwf.' >&2
165 QA_COMPILER=clang QA_SANITIZER=address ./qa.sh
166 QA_COMPILER=clang QA_SANITIZER=memory ./qa.sh
167 QA_COMPILER=clang QA_SANITIZER=undefined ./qa.sh
168 QA_COMPILER=gcc QA_PROCESSOR=gcov ./qa.sh