1
0
mirror of https://github.com/nlohmann/json synced 2024-11-21 19:50:04 +00:00

🚧 added check whether code is amalgamated

This commit is contained in:
Niels Lohmann 2018-01-14 10:10:23 +01:00
parent a66b2d20c6
commit 420dcf1f25
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -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