3 # ___\ \/ /_ __ __ _| |_
4 # / _ \\ /| '_ \ / _` | __|
5 # | __// \| |_) | (_| | |_
6 # \___/_/\_\ .__/ \__,_|\__|
9 # Copyright (c) 2017-2023 Sebastian Pipping <sebastian@pipping.org>
10 # Copyright (c) 2018 KangLin <kl222@126.com>
11 # Copyright (c) 2022 Johnny Jazeix <jazeix@gmail.com>
12 # Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com>
13 # Licensed under the MIT license:
15 # Permission is hereby granted, free of charge, to any person obtaining
16 # a copy of this software and associated documentation files (the
17 # "Software"), to deal in the Software without restriction, including
18 # without limitation the rights to use, copy, modify, merge, publish,
19 # distribute, sublicense, and/or sell copies of the Software, and to permit
20 # persons to whom the Software is furnished to do so, subject to the
21 # following conditions:
23 # The above copyright notice and this permission notice shall be included
24 # in all copies or substantial portions of the Software.
26 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
29 # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
30 # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
31 # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
32 # USE OR OTHER DEALINGS IN THE SOFTWARE.
41 ACLOCAL_AMFLAGS = -I m4
42 LIBTOOLFLAGS = --verbose
44 SUBDIRS = lib # lib goes first to build first
55 pkgconfig_DATA = expat.pc
56 pkgconfigdir = $(libdir)/pkgconfig
60 cmake/autotools/expat.cmake
63 cmake/autotools/expat-config-version.cmake \
64 cmake/autotools/expat-noconfig.cmake \
65 cmake/expat-config.cmake
67 cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@
71 cmake/autotools/expat-noconfig__linux.cmake.in \
72 cmake/autotools/expat-noconfig__macos.cmake.in \
73 cmake/autotools/expat-noconfig__windows.cmake.in \
74 cmake/autotools/expat-package-init.cmake \
75 cmake/mingw-toolchain.cmake \
79 ConfigureChecks.cmake \
83 _EXTRA_DIST_WINDOWS = \
84 win32/build_expat_iss.bat \
88 win32/version.rc.cmake
91 $(_EXTRA_DIST_CMAKE) \
92 $(_EXTRA_DIST_WINDOWS) \
95 conftools/get-version.sh \
97 fuzz/xml_parsebuffer_fuzzer.c \
98 fuzz/xml_parse_fuzzer.c \
100 xmlwf/xmlwf_helpgen.py \
101 xmlwf/xmlwf_helpgen.sh \
108 test-driver-wrapper.sh
113 @echo 'ERROR: Running "make buildlib LIBRARY=libexpatw.la"' >&2
114 @echo 'ERROR: is no longer supported. INSTEAD please:' >&2
116 @echo 'ERROR: * Mass-patch Makefile.am, e.g.' >&2
117 @echo 'ERROR: # find -name Makefile.am -exec sed \' >&2
118 @echo 'ERROR: -e "s,libexpat\.la,libexpatw.la," \' >&2
119 @echo 'ERROR: -e "s,libexpat_la,libexpatw_la," \' >&2
120 @echo 'ERROR: -i {} +' >&2
122 @echo 'ERROR: * Run automake to re-generate Makefile.in files' >&2
124 @echo 'ERROR: * Use "./configure --without-xmlwf" and/or' >&2
125 @echo 'ERROR: "make -C lib all install" to bypass compilation' >&2
126 @echo 'ERROR: of xmlwf (e.g. with -DXML_UNICODE)' >&2
131 .PHONY: run-benchmark
133 $(MAKE) -C tests/benchmark
134 ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
135 ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_attr.xml 4096 3
136 ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_cdata.xml 4096 3
137 ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_comment.xml 4096 3
138 ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_tag.xml 4096 3
139 ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_text.xml 4096 3
141 .PHONY: download-xmlts-zip
143 if test "$(XMLTS_ZIP)" = ""; then \
144 wget --output-document=tests/xmlts.zip \
145 https://www.w3.org/XML/Test/xmlts20080827.zip; \
147 cp $(XMLTS_ZIP) tests/xmlts.zip; \
151 $(MAKE) download-xmlts-zip
153 .PHONY: extract-xmlts-zip
154 extract-xmlts-zip: tests/xmlts.zip
155 [ -f $(builddir)/tests/xmlts.zip ] || $(MAKE) download-xmlts-zip # vpath workaround
156 cd tests && unzip -q xmlts.zip
158 tests/xmlconf: tests/xmlts.zip
159 $(MAKE) extract-xmlts-zip
162 run-xmltest: tests/xmlconf
164 [ -d $(builddir)/tests/xmlconf ] || $(MAKE) extract-xmlts-zip # vpath workaround
167 $(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log
168 $(srcdir)/fix-xmltest-log.sh $(builddir)/tests/xmltest.log
169 diff -u $(srcdir)/tests/xmltest.log.expected $(builddir)/tests/xmltest.log
171 @echo 'ERROR: xmlwf is needed for "make run-xmltest".' >&2
172 @echo 'ERROR: Please re-configure without --without-xmlwf.' >&2
178 QA_COMPILER=clang QA_SANITIZER=address ./qa.sh
179 QA_COMPILER=clang QA_SANITIZER=memory ./qa.sh
180 QA_COMPILER=clang QA_SANITIZER=undefined ./qa.sh
181 QA_COMPILER=gcc QA_PROCESSOR=gcov ./qa.sh