blob: 545ff27305f5b2888ec2bdfa7e0901de19e351ad [file] [log] [blame]
Christopher Dunn9c91b992015-02-13 11:24:35 -06001# This is only for jsoncpp developers/contributors.
2# We use this to sign releases, generate documentation, etc.
Christopher Dunn5c4219b2021-01-10 00:17:35 -06003VER?=$(shell cat version)
Christopher Dunnd2fa6642014-09-10 18:01:31 -07004
Christopher Dunn9c91b992015-02-13 11:24:35 -06005default:
6 @echo "VER=${VER}"
Christopher Dunn5c4219b2021-01-10 00:17:35 -06007update-version:
8 perl get_version.pl meson.build >| version
Christopher Dunn9c91b992015-02-13 11:24:35 -06009sign: jsoncpp-${VER}.tar.gz
10 gpg --armor --detach-sign $<
11 gpg --verify $<.asc
12 # Then upload .asc to the release.
13jsoncpp-%.tar.gz:
14 curl https://github.com/open-source-parsers/jsoncpp/archive/$*.tar.gz -o $@
15dox:
16 python doxybuild.py --doxygen=$$(which doxygen) --in doc/web_doxyfile.in
Christopher Dunna7ad98f2017-09-10 19:54:23 -050017 rsync -va -c --delete dist/doxygen/jsoncpp-api-html-${VER}/ ../jsoncpp-docs/doxygen/
Christopher Dunn9c91b992015-02-13 11:24:35 -060018 # Then 'git add -A' and 'git push' in jsoncpp-docs.
Christopher Dunnd2fa6642014-09-10 18:01:31 -070019build:
20 mkdir -p build/debug
Gauravc09e1212015-04-23 19:00:56 +053021 cd build/debug; cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_SHARED_LIBS=ON -G "Unix Makefiles" ../..
Christopher Dunnd2fa6642014-09-10 18:01:31 -070022 make -C build/debug
23
24# Currently, this depends on include/json/version.h generated
25# by cmake.
Christopher Dunn9c91b992015-02-13 11:24:35 -060026test-amalgamate:
Christopher Dunnd2fa6642014-09-10 18:01:31 -070027 python2.7 amalgamate.py
28 python3.4 amalgamate.py
Christopher Dunn6c898442015-02-25 10:02:30 -060029 cd dist; gcc -I. -c jsoncpp.cpp
Christopher Dunnd2fa6642014-09-10 18:01:31 -070030
Christopher Dunn88184d12015-04-22 19:43:27 -070031valgrind:
32 valgrind --error-exitcode=42 --leak-check=full ./build/debug/src/test_lib_json/jsoncpp_test
33
Christopher Dunn9c91b992015-02-13 11:24:35 -060034clean:
35 \rm -rf *.gz *.asc dist/
36
Christopher Dunnd2fa6642014-09-10 18:01:31 -070037.PHONY: build