From 420dcf1f25db25d6a7799118a2b481fea83dfae0 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 14 Jan 2018 10:10:23 +0100 Subject: [PATCH] :construction: added check whether code is amalgamated --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 0029f849..eb179156 100644 --- a/Makefile +++ b/Makefile @@ -29,8 +29,10 @@ CXX=clang++ # main target all: + @echo "amalgamate - amalgamate file src/json.hpp from the develop sources" @echo "ChangeLog.md - generate ChangeLog file" @echo "check - compile and execute test suite" + @echo "check-amalagamation - check whether sources have been amalgamated" @echo "check-fast - compile and execute test suite (skip long-running tests)" @echo "clean - remove built files" @echo "coverage - create coverage information with lcov" @@ -255,6 +257,13 @@ src/json.hpp: $(SRCS) develop/amalgamate/amalgamate.py -c develop/amalgamate/config.json -s develop --verbose=yes $(MAKE) pretty +# check if src/json.hpp has been amalgamated from the develop sources +check-amalagamation: + @mv src/json.hpp src/json.hpp~ + @$(MAKE) amalgamate + @diff src/json.hpp src/json.hpp~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv src/json.hpp~ src/json.hpp ; false) + @mv src/json.hpp~ src/json.hpp + ########################################################################## # changelog