Makefile.am 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. #
  2. # __ __ _
  3. # ___\ \/ /_ __ __ _| |_
  4. # / _ \\ /| '_ \ / _` | __|
  5. # | __// \| |_) | (_| | |_
  6. # \___/_/\_\ .__/ \__,_|\__|
  7. # |_| XML parser
  8. #
  9. # Copyright (c) 2017-2021 Sebastian Pipping <[email protected]>
  10. # Copyright (c) 2018 KangLin <[email protected]>
  11. # Licensed under the MIT license:
  12. #
  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:
  20. #
  21. # The above copyright notice and this permission notice shall be included
  22. # in all copies or substantial portions of the Software.
  23. #
  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.
  31. AUTOMAKE_OPTIONS = \
  32. dist-bzip2 \
  33. dist-lzip \
  34. dist-xz \
  35. foreign \
  36. subdir-objects
  37. ACLOCAL_AMFLAGS = -I m4
  38. LIBTOOLFLAGS = --verbose
  39. SUBDIRS = lib # lib goes first to build first
  40. if WITH_EXAMPLES
  41. SUBDIRS += examples
  42. endif
  43. if WITH_TESTS
  44. SUBDIRS += tests
  45. endif
  46. if WITH_XMLWF
  47. SUBDIRS += xmlwf doc
  48. endif
  49. pkgconfig_DATA = expat.pc
  50. pkgconfigdir = $(libdir)/pkgconfig
  51. dist_cmake_DATA = \
  52. cmake/autotools/expat.cmake
  53. nodist_cmake_DATA = \
  54. cmake/autotools/expat-config-version.cmake \
  55. cmake/autotools/expat-noconfig.cmake \
  56. cmake/expat-config.cmake
  57. cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@
  58. _EXTRA_DIST_CMAKE = \
  59. cmake/autotools/expat-noconfig__linux.cmake.in \
  60. cmake/autotools/expat-noconfig__macos.cmake.in \
  61. cmake/autotools/expat-noconfig__windows.cmake.in \
  62. cmake/autotools/expat-package-init.cmake \
  63. cmake/mingw-toolchain.cmake \
  64. \
  65. CMakeLists.txt \
  66. CMake.README \
  67. ConfigureChecks.cmake \
  68. expat_config.h.cmake
  69. _EXTRA_DIST_WINDOWS = \
  70. win32/build_expat_iss.bat \
  71. win32/expat.iss \
  72. win32/MANIFEST.txt \
  73. win32/README.txt
  74. EXTRA_DIST = \
  75. $(_EXTRA_DIST_CMAKE) \
  76. $(_EXTRA_DIST_WINDOWS) \
  77. \
  78. conftools/expat.m4 \
  79. conftools/get-version.sh \
  80. \
  81. xmlwf/xmlwf_helpgen.py \
  82. xmlwf/xmlwf_helpgen.sh \
  83. \
  84. Changes \
  85. README.md \
  86. \
  87. fix-xmltest-log.sh \
  88. test-driver-wrapper.sh
  89. .PHONY: buildlib
  90. buildlib:
  91. @echo 'ERROR: Running "make buildlib LIBRARY=libexpatw.la"' >&2
  92. @echo 'ERROR: is no longer supported. INSTEAD please:' >&2
  93. @echo 'ERROR:' >&2
  94. @echo 'ERROR: * Mass-patch Makefile.am, e.g.' >&2
  95. @echo 'ERROR: # find -name Makefile.am -exec sed \' >&2
  96. @echo 'ERROR: -e "s,libexpat\.la,libexpatw.la," \' >&2
  97. @echo 'ERROR: -e "s,libexpat_la,libexpatw_la," \' >&2
  98. @echo 'ERROR: -i {} +' >&2
  99. @echo 'ERROR:' >&2
  100. @echo 'ERROR: * Run automake to re-generate Makefile.in files' >&2
  101. @echo 'ERROR:' >&2
  102. @echo 'ERROR: * Use "./configure --without-xmlwf" and/or' >&2
  103. @echo 'ERROR: "make -C lib all install" to bypass compilation' >&2
  104. @echo 'ERROR: of xmlwf (e.g. with -DXML_UNICODE)' >&2
  105. @echo 'ERROR:' >&2
  106. @false
  107. .PHONY: run-benchmark
  108. run-benchmark:
  109. $(MAKE) -C tests/benchmark
  110. ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
  111. .PHONY: download-xmlts-zip
  112. download-xmlts-zip:
  113. if test "$(XMLTS_ZIP)" = ""; then \
  114. wget --output-document=tests/xmlts.zip \
  115. https://www.w3.org/XML/Test/xmlts20080827.zip; \
  116. else \
  117. cp $(XMLTS_ZIP) tests/xmlts.zip; \
  118. fi
  119. tests/xmlts.zip:
  120. $(MAKE) download-xmlts-zip
  121. .PHONY: extract-xmlts-zip
  122. extract-xmlts-zip: tests/xmlts.zip
  123. [ -f $(builddir)/tests/xmlts.zip ] || $(MAKE) download-xmlts-zip # vpath workaround
  124. cd tests && unzip -q xmlts.zip
  125. tests/xmlconf: tests/xmlts.zip
  126. $(MAKE) extract-xmlts-zip
  127. .PHONY: run-xmltest
  128. run-xmltest: tests/xmlconf
  129. if WITH_XMLWF
  130. [ -d $(builddir)/tests/xmlconf ] || $(MAKE) extract-xmlts-zip # vpath workaround
  131. $(MAKE) -C lib
  132. $(MAKE) -C xmlwf
  133. $(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log
  134. $(srcdir)/fix-xmltest-log.sh $(builddir)/tests/xmltest.log
  135. diff -u $(srcdir)/tests/xmltest.log.expected $(builddir)/tests/xmltest.log
  136. else
  137. @echo 'ERROR: xmlwf is needed for "make run-xmltest".' >&2
  138. @echo 'ERROR: Please re-configure without --without-xmlwf.' >&2
  139. @false
  140. endif
  141. .PHONY: qa
  142. qa:
  143. QA_COMPILER=clang QA_SANITIZER=address ./qa.sh
  144. QA_COMPILER=clang QA_SANITIZER=memory ./qa.sh
  145. QA_COMPILER=clang QA_SANITIZER=undefined ./qa.sh
  146. QA_COMPILER=gcc QA_PROCESSOR=gcov ./qa.sh