From 0679ea07c624944b3e51934fb6d4015296bf9117 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sun, 24 Jan 2021 03:51:30 +0300 Subject: [PATCH] mdbx-make: rework verification amalgamated sources during `make build`. Rework 0166071ec9a7f8146bbacf9a8c218d8825f719c9 for https://github.com/erthink/libmdbx/issues/155 Related to https://github.com/erthink/libmdbx/issues/156 Change-Id: I40697203ff351d10709b3094d50b894c663c67c3 --- GNUmakefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 5a0c7f00..4dfa1a15 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -308,9 +308,10 @@ tags: release-assets: libmdbx-sources-$(MDBX_VERSION_SUFFIX).tar.gz libmdbx-sources-$(MDBX_VERSION_SUFFIX).zip dist-checked.tag: $(addprefix dist/, $(DIST_SRC) $(DIST_EXTRA)) - rm -rf $@ && echo "Check amalgamated sources..." \ - && rm -rf dist-check && cp -r -p dist dist-check && $(MAKE) -C dist-check \ - && touch $@ + @rm -rf $@ && echo -n "Verify amalgamated sources..." \ + && if grep -R "define MDBX_ALLOY" dist | grep -q MDBX_BUILD_SOURCERY; then echo "sed output is WRONG!" >&2; exit 2; fi \ + && rm -rf dist-check && cp -r -p dist dist-check && $(MAKE) -C dist-check > dist-check/build.log 2> dist-check/build.err \ + && touch $@ || (echo " FAILED! See dist-check/build.err" >&2; exit 2) && echo " Ok" libmdbx-sources-$(MDBX_VERSION_SUFFIX).tar.gz: dist-checked.tag $(TAR) -c $(shell LC_ALL=C $(TAR) --help | grep -q -- '--owner' && echo '--owner=0 --group=0') -f - -C dist $(DIST_SRC) $(DIST_EXTRA) | gzip -c -9 > $@ \