summaryrefslogtreecommitdiff
path: root/expat/Makefile.am
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2019-08-11 18:08:44 +0200
committerSebastian Pipping <sebastian@pipping.org>2019-08-11 19:38:08 +0200
commitd4ed0019a9072dec0d11ecf7c2b99a9c7adb3ceb (patch)
tree35387fd1a3b0661c67175fa614cc6dd44cf560b2 /expat/Makefile.am
parent3cb24b6e5965597f8204a8a9981b9ddf3f5cfcff (diff)
downloadlibexpat-git-d4ed0019a9072dec0d11ecf7c2b99a9c7adb3ceb.tar.gz
Makefile.am: Make "run-xmltest" more robust
Robust towards existing file $(srcdir)/tests/xmlts.zip Robust towards existing directory $(srcdir)/tests/xmlconf/ Because if make finds the in $(srcdir) and does not create them in $(builddir).
Diffstat (limited to 'expat/Makefile.am')
-rw-r--r--expat/Makefile.am14
1 files changed, 12 insertions, 2 deletions
diff --git a/expat/Makefile.am b/expat/Makefile.am
index 4de3f41d..f5a49ea9 100644
--- a/expat/Makefile.am
+++ b/expat/Makefile.am
@@ -130,7 +130,8 @@ run-benchmark:
$(MAKE) -C tests/benchmark
./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
-tests/xmlts.zip:
+.PHONY: download-xmlts-zip
+download-xmlts-zip:
if test "$(XMLTS_ZIP)" = ""; then \
wget --output-document=tests/xmlts.zip \
https://www.w3.org/XML/Test/xmlts20080827.zip; \
@@ -138,12 +139,21 @@ tests/xmlts.zip:
cp $(XMLTS_ZIP) tests/xmlts.zip; \
fi
-tests/xmlconf: tests/xmlts.zip
+tests/xmlts.zip:
+ $(MAKE) download-xmlts-zip
+
+.PHONY: extract-xmlts-zip
+extract-xmlts-zip: tests/xmlts.zip
+ [ -f $(builddir)/tests/xmlts.zip ] || $(MAKE) download-xmlts-zip # vpath workaround
cd tests && unzip -q xmlts.zip
+tests/xmlconf: tests/xmlts.zip
+ $(MAKE) extract-xmlts-zip
+
.PHONY: run-xmltest
run-xmltest: tests/xmlconf
if WITH_XMLWF
+ [ -d $(builddir)/tests/xmlconf ] || $(MAKE) extract-xmlts-zip # vpath workaround
$(MAKE) -C lib
$(MAKE) -C xmlwf
$(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log