1 1.1 maya # 2 1.1 maya # __ __ _ 3 1.1 maya # ___\ \/ /_ __ __ _| |_ 4 1.1 maya # / _ \\ /| '_ \ / _` | __| 5 1.1 maya # | __// \| |_) | (_| | |_ 6 1.1 maya # \___/_/\_\ .__/ \__,_|\__| 7 1.1 maya # |_| XML parser 8 1.1 maya # 9 1.1.1.4 wiz # Copyright (c) 2017-2025 Sebastian Pipping <sebastian (at] pipping.org> 10 1.1.1.2 christos # Copyright (c) 2018 KangLin <kl222 (at] 126.com> 11 1.1.1.3 wiz # Copyright (c) 2022 Johnny Jazeix <jazeix (at] gmail.com> 12 1.1.1.3 wiz # Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild (at] sony.com> 13 1.1.1.3 wiz # Copyright (c) 2024 Alexander Bluhm <alexander.bluhm (at] gmx.net> 14 1.1.1.3 wiz # Copyright (c) 2024 Dag-Erling Smrgrav <des (at] des.dev> 15 1.1 maya # Licensed under the MIT license: 16 1.1 maya # 17 1.1 maya # Permission is hereby granted, free of charge, to any person obtaining 18 1.1 maya # a copy of this software and associated documentation files (the 19 1.1 maya # "Software"), to deal in the Software without restriction, including 20 1.1 maya # without limitation the rights to use, copy, modify, merge, publish, 21 1.1 maya # distribute, sublicense, and/or sell copies of the Software, and to permit 22 1.1 maya # persons to whom the Software is furnished to do so, subject to the 23 1.1 maya # following conditions: 24 1.1 maya # 25 1.1 maya # The above copyright notice and this permission notice shall be included 26 1.1 maya # in all copies or substantial portions of the Software. 27 1.1 maya # 28 1.1 maya # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 29 1.1 maya # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 30 1.1 maya # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 31 1.1 maya # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 32 1.1 maya # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 33 1.1 maya # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 34 1.1 maya # USE OR OTHER DEALINGS IN THE SOFTWARE. 35 1.1 maya 36 1.1 maya AUTOMAKE_OPTIONS = \ 37 1.1 maya dist-bzip2 \ 38 1.1 maya dist-lzip \ 39 1.1 maya dist-xz \ 40 1.1 maya foreign \ 41 1.1 maya subdir-objects 42 1.1 maya 43 1.1 maya ACLOCAL_AMFLAGS = -I m4 44 1.1 maya LIBTOOLFLAGS = --verbose 45 1.1 maya 46 1.1 maya SUBDIRS = lib # lib goes first to build first 47 1.1 maya if WITH_EXAMPLES 48 1.1 maya SUBDIRS += examples 49 1.1 maya endif 50 1.1 maya if WITH_TESTS 51 1.1 maya SUBDIRS += tests 52 1.1 maya endif 53 1.1 maya if WITH_XMLWF 54 1.1 maya SUBDIRS += xmlwf doc 55 1.1 maya endif 56 1.1 maya 57 1.1 maya pkgconfig_DATA = expat.pc 58 1.1 maya pkgconfigdir = $(libdir)/pkgconfig 59 1.1 maya 60 1.1 maya 61 1.1.1.2 christos dist_cmake_DATA = \ 62 1.1.1.2 christos cmake/autotools/expat.cmake 63 1.1.1.2 christos 64 1.1.1.2 christos nodist_cmake_DATA = \ 65 1.1.1.2 christos cmake/autotools/expat-config-version.cmake \ 66 1.1.1.2 christos cmake/autotools/expat-noconfig.cmake \ 67 1.1.1.2 christos cmake/expat-config.cmake 68 1.1.1.2 christos 69 1.1.1.2 christos cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@ 70 1.1.1.2 christos 71 1.1.1.2 christos 72 1.1 maya _EXTRA_DIST_CMAKE = \ 73 1.1.1.2 christos cmake/autotools/expat-noconfig__linux.cmake.in \ 74 1.1.1.2 christos cmake/autotools/expat-noconfig__macos.cmake.in \ 75 1.1.1.2 christos cmake/autotools/expat-noconfig__windows.cmake.in \ 76 1.1.1.2 christos cmake/autotools/expat-package-init.cmake \ 77 1.1 maya cmake/mingw-toolchain.cmake \ 78 1.1 maya \ 79 1.1 maya CMakeLists.txt \ 80 1.1 maya CMake.README \ 81 1.1 maya ConfigureChecks.cmake \ 82 1.1.1.2 christos expat.pc.cmake \ 83 1.1 maya expat_config.h.cmake 84 1.1 maya 85 1.1 maya _EXTRA_DIST_WINDOWS = \ 86 1.1 maya win32/build_expat_iss.bat \ 87 1.1 maya win32/expat.iss \ 88 1.1 maya win32/MANIFEST.txt \ 89 1.1.1.3 wiz win32/README.txt \ 90 1.1.1.3 wiz win32/version.rc.cmake 91 1.1 maya 92 1.1 maya EXTRA_DIST = \ 93 1.1 maya $(_EXTRA_DIST_CMAKE) \ 94 1.1 maya $(_EXTRA_DIST_WINDOWS) \ 95 1.1 maya \ 96 1.1 maya conftools/expat.m4 \ 97 1.1 maya conftools/get-version.sh \ 98 1.1.1.2 christos \ 99 1.1.1.4 wiz fuzz/xml_lpm_fuzzer.cpp \ 100 1.1.1.4 wiz fuzz/xml_lpm_fuzzer.proto \ 101 1.1.1.2 christos fuzz/xml_parsebuffer_fuzzer.c \ 102 1.1.1.2 christos fuzz/xml_parse_fuzzer.c \ 103 1.1 maya \ 104 1.1 maya xmlwf/xmlwf_helpgen.py \ 105 1.1 maya xmlwf/xmlwf_helpgen.sh \ 106 1.1 maya \ 107 1.1.1.2 christos buildconf.sh \ 108 1.1 maya Changes \ 109 1.1 maya README.md \ 110 1.1 maya \ 111 1.1 maya fix-xmltest-log.sh \ 112 1.1 maya test-driver-wrapper.sh 113 1.1 maya 114 1.1 maya 115 1.1 maya .PHONY: buildlib 116 1.1 maya buildlib: 117 1.1 maya @echo 'ERROR: Running "make buildlib LIBRARY=libexpatw.la"' >&2 118 1.1 maya @echo 'ERROR: is no longer supported. INSTEAD please:' >&2 119 1.1 maya @echo 'ERROR:' >&2 120 1.1 maya @echo 'ERROR: * Mass-patch Makefile.am, e.g.' >&2 121 1.1.1.3 wiz @echo 'ERROR: # find . -name Makefile.am -exec sed \' >&2 122 1.1 maya @echo 'ERROR: -e "s,libexpat\.la,libexpatw.la," \' >&2 123 1.1 maya @echo 'ERROR: -e "s,libexpat_la,libexpatw_la," \' >&2 124 1.1.1.3 wiz @echo 'ERROR: -i.bak {} +' >&2 125 1.1 maya @echo 'ERROR:' >&2 126 1.1 maya @echo 'ERROR: * Run automake to re-generate Makefile.in files' >&2 127 1.1 maya @echo 'ERROR:' >&2 128 1.1 maya @echo 'ERROR: * Use "./configure --without-xmlwf" and/or' >&2 129 1.1 maya @echo 'ERROR: "make -C lib all install" to bypass compilation' >&2 130 1.1 maya @echo 'ERROR: of xmlwf (e.g. with -DXML_UNICODE)' >&2 131 1.1 maya @echo 'ERROR:' >&2 132 1.1 maya @false 133 1.1 maya 134 1.1 maya 135 1.1 maya .PHONY: run-benchmark 136 1.1 maya run-benchmark: 137 1.1 maya $(MAKE) -C tests/benchmark 138 1.1 maya ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3 139 1.1.1.3 wiz ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_attr.xml 4096 3 140 1.1.1.3 wiz ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_cdata.xml 4096 3 141 1.1.1.3 wiz ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_comment.xml 4096 3 142 1.1.1.3 wiz ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_tag.xml 4096 3 143 1.1.1.3 wiz ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_text.xml 4096 3 144 1.1 maya 145 1.1 maya .PHONY: download-xmlts-zip 146 1.1 maya download-xmlts-zip: 147 1.1 maya if test "$(XMLTS_ZIP)" = ""; then \ 148 1.1 maya wget --output-document=tests/xmlts.zip \ 149 1.1 maya https://www.w3.org/XML/Test/xmlts20080827.zip; \ 150 1.1 maya else \ 151 1.1 maya cp $(XMLTS_ZIP) tests/xmlts.zip; \ 152 1.1 maya fi 153 1.1 maya 154 1.1 maya tests/xmlts.zip: 155 1.1 maya $(MAKE) download-xmlts-zip 156 1.1 maya 157 1.1 maya .PHONY: extract-xmlts-zip 158 1.1 maya extract-xmlts-zip: tests/xmlts.zip 159 1.1 maya [ -f $(builddir)/tests/xmlts.zip ] || $(MAKE) download-xmlts-zip # vpath workaround 160 1.1 maya cd tests && unzip -q xmlts.zip 161 1.1 maya 162 1.1 maya tests/xmlconf: tests/xmlts.zip 163 1.1 maya $(MAKE) extract-xmlts-zip 164 1.1 maya 165 1.1 maya .PHONY: run-xmltest 166 1.1 maya run-xmltest: tests/xmlconf 167 1.1 maya if WITH_XMLWF 168 1.1 maya [ -d $(builddir)/tests/xmlconf ] || $(MAKE) extract-xmlts-zip # vpath workaround 169 1.1 maya $(MAKE) -C lib 170 1.1 maya $(MAKE) -C xmlwf 171 1.1 maya $(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log 172 1.1 maya $(srcdir)/fix-xmltest-log.sh $(builddir)/tests/xmltest.log 173 1.1 maya diff -u $(srcdir)/tests/xmltest.log.expected $(builddir)/tests/xmltest.log 174 1.1 maya else 175 1.1 maya @echo 'ERROR: xmlwf is needed for "make run-xmltest".' >&2 176 1.1 maya @echo 'ERROR: Please re-configure without --without-xmlwf.' >&2 177 1.1 maya @false 178 1.1 maya endif 179 1.1 maya 180 1.1 maya .PHONY: qa 181 1.1 maya qa: 182 1.1 maya QA_COMPILER=clang QA_SANITIZER=address ./qa.sh 183 1.1 maya QA_COMPILER=clang QA_SANITIZER=memory ./qa.sh 184 1.1 maya QA_COMPILER=clang QA_SANITIZER=undefined ./qa.sh 185 1.1 maya QA_COMPILER=gcc QA_PROCESSOR=gcov ./qa.sh 186