1c5f01b2fSopenharmony_ci.PHONY: pretty clean ChangeLog.md release 2c5f01b2fSopenharmony_ci 3c5f01b2fSopenharmony_ci########################################################################## 4c5f01b2fSopenharmony_ci# configuration 5c5f01b2fSopenharmony_ci########################################################################## 6c5f01b2fSopenharmony_ci 7c5f01b2fSopenharmony_ci# find GNU sed to use `-i` parameter 8c5f01b2fSopenharmony_ciSED:=$(shell command -v gsed || which sed) 9c5f01b2fSopenharmony_ci 10c5f01b2fSopenharmony_ci 11c5f01b2fSopenharmony_ci########################################################################## 12c5f01b2fSopenharmony_ci# source files 13c5f01b2fSopenharmony_ci########################################################################## 14c5f01b2fSopenharmony_ci 15c5f01b2fSopenharmony_ci# the list of sources in the include folder 16c5f01b2fSopenharmony_ciSRCS=$(shell find include -type f | sort) 17c5f01b2fSopenharmony_ci 18c5f01b2fSopenharmony_ci# the list of sources in the tests folder 19c5f01b2fSopenharmony_ciTESTS_SRCS=$(shell find tests -type f \( -name '*.hpp' -o -name '*.cpp' -o -name '*.cu' \) -not -path 'tests/thirdparty/*' -not -path 'tests/abi/include/nlohmann/*' | sort) 20c5f01b2fSopenharmony_ci 21c5f01b2fSopenharmony_ci# the single headers (amalgamated from the source files) 22c5f01b2fSopenharmony_ciAMALGAMATED_FILE=single_include/nlohmann/json.hpp 23c5f01b2fSopenharmony_ciAMALGAMATED_FWD_FILE=single_include/nlohmann/json_fwd.hpp 24c5f01b2fSopenharmony_ci 25c5f01b2fSopenharmony_ci 26c5f01b2fSopenharmony_ci########################################################################## 27c5f01b2fSopenharmony_ci# documentation of the Makefile's targets 28c5f01b2fSopenharmony_ci########################################################################## 29c5f01b2fSopenharmony_ci 30c5f01b2fSopenharmony_ci# main target 31c5f01b2fSopenharmony_ciall: 32c5f01b2fSopenharmony_ci @echo "amalgamate - amalgamate files single_include/nlohmann/json{,_fwd}.hpp from the include/nlohmann sources" 33c5f01b2fSopenharmony_ci @echo "ChangeLog.md - generate ChangeLog file" 34c5f01b2fSopenharmony_ci @echo "check-amalgamation - check whether sources have been amalgamated" 35c5f01b2fSopenharmony_ci @echo "clean - remove built files" 36c5f01b2fSopenharmony_ci @echo "doctest - compile example files and check their output" 37c5f01b2fSopenharmony_ci @echo "fuzz_testing - prepare fuzz testing of the JSON parser" 38c5f01b2fSopenharmony_ci @echo "fuzz_testing_bson - prepare fuzz testing of the BSON parser" 39c5f01b2fSopenharmony_ci @echo "fuzz_testing_cbor - prepare fuzz testing of the CBOR parser" 40c5f01b2fSopenharmony_ci @echo "fuzz_testing_msgpack - prepare fuzz testing of the MessagePack parser" 41c5f01b2fSopenharmony_ci @echo "fuzz_testing_ubjson - prepare fuzz testing of the UBJSON parser" 42c5f01b2fSopenharmony_ci @echo "pretty - beautify code with Artistic Style" 43c5f01b2fSopenharmony_ci @echo "run_benchmarks - build and run benchmarks" 44c5f01b2fSopenharmony_ci 45c5f01b2fSopenharmony_ci 46c5f01b2fSopenharmony_ci########################################################################## 47c5f01b2fSopenharmony_ci# documentation tests 48c5f01b2fSopenharmony_ci########################################################################## 49c5f01b2fSopenharmony_ci 50c5f01b2fSopenharmony_ci# compile example files and check output 51c5f01b2fSopenharmony_cidoctest: 52c5f01b2fSopenharmony_ci $(MAKE) check_output -C docs 53c5f01b2fSopenharmony_ci 54c5f01b2fSopenharmony_ci 55c5f01b2fSopenharmony_ci########################################################################## 56c5f01b2fSopenharmony_ci# benchmarks 57c5f01b2fSopenharmony_ci########################################################################## 58c5f01b2fSopenharmony_ci 59c5f01b2fSopenharmony_cirun_benchmarks: 60c5f01b2fSopenharmony_ci rm -fr cmake-build-benchmarks 61c5f01b2fSopenharmony_ci mkdir cmake-build-benchmarks 62c5f01b2fSopenharmony_ci cd cmake-build-benchmarks ; cmake ../tests/benchmarks -GNinja -DCMAKE_BUILD_TYPE=Release 63c5f01b2fSopenharmony_ci cd cmake-build-benchmarks ; ninja 64c5f01b2fSopenharmony_ci cd cmake-build-benchmarks ; ./json_benchmarks 65c5f01b2fSopenharmony_ci 66c5f01b2fSopenharmony_ci 67c5f01b2fSopenharmony_ci########################################################################## 68c5f01b2fSopenharmony_ci# fuzzing 69c5f01b2fSopenharmony_ci########################################################################## 70c5f01b2fSopenharmony_ci 71c5f01b2fSopenharmony_ci# the overall fuzz testing target 72c5f01b2fSopenharmony_cifuzz_testing: 73c5f01b2fSopenharmony_ci rm -fr fuzz-testing 74c5f01b2fSopenharmony_ci mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out 75c5f01b2fSopenharmony_ci $(MAKE) parse_afl_fuzzer -C tests CXX=afl-clang++ 76c5f01b2fSopenharmony_ci mv tests/parse_afl_fuzzer fuzz-testing/fuzzer 77c5f01b2fSopenharmony_ci find tests/data/json_tests -size -5k -name *json | xargs -I{} cp "{}" fuzz-testing/testcases 78c5f01b2fSopenharmony_ci @echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer" 79c5f01b2fSopenharmony_ci 80c5f01b2fSopenharmony_cifuzz_testing_bson: 81c5f01b2fSopenharmony_ci rm -fr fuzz-testing 82c5f01b2fSopenharmony_ci mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out 83c5f01b2fSopenharmony_ci $(MAKE) parse_bson_fuzzer -C tests CXX=afl-clang++ 84c5f01b2fSopenharmony_ci mv tests/parse_bson_fuzzer fuzz-testing/fuzzer 85c5f01b2fSopenharmony_ci find tests/data -size -5k -name *.bson | xargs -I{} cp "{}" fuzz-testing/testcases 86c5f01b2fSopenharmony_ci @echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer" 87c5f01b2fSopenharmony_ci 88c5f01b2fSopenharmony_cifuzz_testing_cbor: 89c5f01b2fSopenharmony_ci rm -fr fuzz-testing 90c5f01b2fSopenharmony_ci mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out 91c5f01b2fSopenharmony_ci $(MAKE) parse_cbor_fuzzer -C tests CXX=afl-clang++ 92c5f01b2fSopenharmony_ci mv tests/parse_cbor_fuzzer fuzz-testing/fuzzer 93c5f01b2fSopenharmony_ci find tests/data -size -5k -name *.cbor | xargs -I{} cp "{}" fuzz-testing/testcases 94c5f01b2fSopenharmony_ci @echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer" 95c5f01b2fSopenharmony_ci 96c5f01b2fSopenharmony_cifuzz_testing_msgpack: 97c5f01b2fSopenharmony_ci rm -fr fuzz-testing 98c5f01b2fSopenharmony_ci mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out 99c5f01b2fSopenharmony_ci $(MAKE) parse_msgpack_fuzzer -C tests CXX=afl-clang++ 100c5f01b2fSopenharmony_ci mv tests/parse_msgpack_fuzzer fuzz-testing/fuzzer 101c5f01b2fSopenharmony_ci find tests/data -size -5k -name *.msgpack | xargs -I{} cp "{}" fuzz-testing/testcases 102c5f01b2fSopenharmony_ci @echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer" 103c5f01b2fSopenharmony_ci 104c5f01b2fSopenharmony_cifuzz_testing_ubjson: 105c5f01b2fSopenharmony_ci rm -fr fuzz-testing 106c5f01b2fSopenharmony_ci mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out 107c5f01b2fSopenharmony_ci $(MAKE) parse_ubjson_fuzzer -C tests CXX=afl-clang++ 108c5f01b2fSopenharmony_ci mv tests/parse_ubjson_fuzzer fuzz-testing/fuzzer 109c5f01b2fSopenharmony_ci find tests/data -size -5k -name *.ubjson | xargs -I{} cp "{}" fuzz-testing/testcases 110c5f01b2fSopenharmony_ci @echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer" 111c5f01b2fSopenharmony_ci 112c5f01b2fSopenharmony_cifuzzing-start: 113c5f01b2fSopenharmony_ci afl-fuzz -S fuzzer1 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null & 114c5f01b2fSopenharmony_ci afl-fuzz -S fuzzer2 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null & 115c5f01b2fSopenharmony_ci afl-fuzz -S fuzzer3 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null & 116c5f01b2fSopenharmony_ci afl-fuzz -S fuzzer4 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null & 117c5f01b2fSopenharmony_ci afl-fuzz -S fuzzer5 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null & 118c5f01b2fSopenharmony_ci afl-fuzz -S fuzzer6 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null & 119c5f01b2fSopenharmony_ci afl-fuzz -S fuzzer7 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null & 120c5f01b2fSopenharmony_ci afl-fuzz -M fuzzer0 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer 121c5f01b2fSopenharmony_ci 122c5f01b2fSopenharmony_cifuzzing-stop: 123c5f01b2fSopenharmony_ci -killall fuzzer 124c5f01b2fSopenharmony_ci -killall afl-fuzz 125c5f01b2fSopenharmony_ci 126c5f01b2fSopenharmony_ci 127c5f01b2fSopenharmony_ci########################################################################## 128c5f01b2fSopenharmony_ci# Static analysis 129c5f01b2fSopenharmony_ci########################################################################## 130c5f01b2fSopenharmony_ci 131c5f01b2fSopenharmony_ci# call PVS-Studio Analyzer <https://www.viva64.com/en/pvs-studio/> 132c5f01b2fSopenharmony_cipvs_studio: 133c5f01b2fSopenharmony_ci rm -fr cmake-build-pvs-studio 134c5f01b2fSopenharmony_ci mkdir cmake-build-pvs-studio 135c5f01b2fSopenharmony_ci cd cmake-build-pvs-studio ; cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DJSON_MultipleHeaders=ON 136c5f01b2fSopenharmony_ci cd cmake-build-pvs-studio ; pvs-studio-analyzer analyze -j 10 137c5f01b2fSopenharmony_ci cd cmake-build-pvs-studio ; plog-converter -a'GA:1,2;64:1;CS' -t fullhtml PVS-Studio.log -o pvs 138c5f01b2fSopenharmony_ci open cmake-build-pvs-studio/pvs/index.html 139c5f01b2fSopenharmony_ci 140c5f01b2fSopenharmony_ci 141c5f01b2fSopenharmony_ci########################################################################## 142c5f01b2fSopenharmony_ci# Code format and source amalgamation 143c5f01b2fSopenharmony_ci########################################################################## 144c5f01b2fSopenharmony_ci 145c5f01b2fSopenharmony_ci# call the Artistic Style pretty printer on all source files 146c5f01b2fSopenharmony_cipretty: 147c5f01b2fSopenharmony_ci astyle \ 148c5f01b2fSopenharmony_ci --style=allman \ 149c5f01b2fSopenharmony_ci --indent=spaces=4 \ 150c5f01b2fSopenharmony_ci --indent-modifiers \ 151c5f01b2fSopenharmony_ci --indent-switches \ 152c5f01b2fSopenharmony_ci --indent-preproc-block \ 153c5f01b2fSopenharmony_ci --indent-preproc-define \ 154c5f01b2fSopenharmony_ci --indent-col1-comments \ 155c5f01b2fSopenharmony_ci --pad-oper \ 156c5f01b2fSopenharmony_ci --pad-header \ 157c5f01b2fSopenharmony_ci --align-pointer=type \ 158c5f01b2fSopenharmony_ci --align-reference=type \ 159c5f01b2fSopenharmony_ci --add-brackets \ 160c5f01b2fSopenharmony_ci --convert-tabs \ 161c5f01b2fSopenharmony_ci --close-templates \ 162c5f01b2fSopenharmony_ci --lineend=linux \ 163c5f01b2fSopenharmony_ci --preserve-date \ 164c5f01b2fSopenharmony_ci --suffix=none \ 165c5f01b2fSopenharmony_ci --formatted \ 166c5f01b2fSopenharmony_ci $(SRCS) $(TESTS_SRCS) $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) docs/examples/*.cpp 167c5f01b2fSopenharmony_ci 168c5f01b2fSopenharmony_ci# call the Clang-Format on all source files 169c5f01b2fSopenharmony_cipretty_format: 170c5f01b2fSopenharmony_ci for FILE in $(SRCS) $(TESTS_SRCS) $(AMALGAMATED_FILE) docs/examples/*.cpp; do echo $$FILE; clang-format -i $$FILE; done 171c5f01b2fSopenharmony_ci 172c5f01b2fSopenharmony_ci# create single header files and pretty print 173c5f01b2fSopenharmony_ciamalgamate: $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) 174c5f01b2fSopenharmony_ci $(MAKE) pretty 175c5f01b2fSopenharmony_ci 176c5f01b2fSopenharmony_ci# call the amalgamation tool for json.hpp 177c5f01b2fSopenharmony_ci$(AMALGAMATED_FILE): $(SRCS) 178c5f01b2fSopenharmony_ci tools/amalgamate/amalgamate.py -c tools/amalgamate/config_json.json -s . --verbose=yes 179c5f01b2fSopenharmony_ci 180c5f01b2fSopenharmony_ci# call the amalgamation tool for json_fwd.hpp 181c5f01b2fSopenharmony_ci$(AMALGAMATED_FWD_FILE): $(SRCS) 182c5f01b2fSopenharmony_ci tools/amalgamate/amalgamate.py -c tools/amalgamate/config_json_fwd.json -s . --verbose=yes 183c5f01b2fSopenharmony_ci 184c5f01b2fSopenharmony_ci# check if file single_include/nlohmann/json.hpp has been amalgamated from the nlohmann sources 185c5f01b2fSopenharmony_ci# Note: this target is called by Travis 186c5f01b2fSopenharmony_cicheck-amalgamation: 187c5f01b2fSopenharmony_ci @mv $(AMALGAMATED_FILE) $(AMALGAMATED_FILE)~ 188c5f01b2fSopenharmony_ci @mv $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_FWD_FILE)~ 189c5f01b2fSopenharmony_ci @$(MAKE) amalgamate 190c5f01b2fSopenharmony_ci @diff $(AMALGAMATED_FILE) $(AMALGAMATED_FILE)~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv $(AMALGAMATED_FILE)~ $(AMALGAMATED_FILE) ; false) 191c5f01b2fSopenharmony_ci @diff $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_FWD_FILE)~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv $(AMALGAMATED_FWD_FILE)~ $(AMALGAMATED_FWD_FILE) ; false) 192c5f01b2fSopenharmony_ci @mv $(AMALGAMATED_FILE)~ $(AMALGAMATED_FILE) 193c5f01b2fSopenharmony_ci @mv $(AMALGAMATED_FWD_FILE)~ $(AMALGAMATED_FWD_FILE) 194c5f01b2fSopenharmony_ci 195c5f01b2fSopenharmony_ci 196c5f01b2fSopenharmony_ci########################################################################## 197c5f01b2fSopenharmony_ci# ChangeLog 198c5f01b2fSopenharmony_ci########################################################################## 199c5f01b2fSopenharmony_ci 200c5f01b2fSopenharmony_ci# Create a ChangeLog based on the git log using the GitHub Changelog Generator 201c5f01b2fSopenharmony_ci# (<https://github.com/github-changelog-generator/github-changelog-generator>). 202c5f01b2fSopenharmony_ci 203c5f01b2fSopenharmony_ci# variable to control the diffs between the last released version and the current repository state 204c5f01b2fSopenharmony_ciNEXT_VERSION ?= "unreleased" 205c5f01b2fSopenharmony_ci 206c5f01b2fSopenharmony_ciChangeLog.md: 207c5f01b2fSopenharmony_ci github_changelog_generator -o ChangeLog.md --user nlohmann --project json --simple-list --release-url https://github.com/nlohmann/json/releases/tag/%s --future-release $(NEXT_VERSION) 208c5f01b2fSopenharmony_ci $(SED) -i 's|https://github.com/nlohmann/json/releases/tag/HEAD|https://github.com/nlohmann/json/tree/HEAD|' ChangeLog.md 209c5f01b2fSopenharmony_ci $(SED) -i '2i All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).' ChangeLog.md 210c5f01b2fSopenharmony_ci 211c5f01b2fSopenharmony_ci 212c5f01b2fSopenharmony_ci########################################################################## 213c5f01b2fSopenharmony_ci# Release files 214c5f01b2fSopenharmony_ci########################################################################## 215c5f01b2fSopenharmony_ci 216c5f01b2fSopenharmony_ci# Create a tar.gz archive that contains sufficient files to be used as CMake project (e.g., using FetchContent). The 217c5f01b2fSopenharmony_ci# archive is created according to the advices of <https://reproducible-builds.org/docs/archives/>. 218c5f01b2fSopenharmony_cijson.tar.xz: 219c5f01b2fSopenharmony_ci mkdir json 220c5f01b2fSopenharmony_ci rsync -R $(shell find LICENSE.MIT nlohmann_json.natvis CMakeLists.txt cmake/*.in include single_include -type f) json 221c5f01b2fSopenharmony_ci gtar --sort=name --mtime="@$(shell git log -1 --pretty=%ct)" --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime --create --file - json | xz --compress -9e --threads=2 - > json.tar.xz 222c5f01b2fSopenharmony_ci rm -fr json 223c5f01b2fSopenharmony_ci 224c5f01b2fSopenharmony_ci# We use `-X` to make the resulting ZIP file reproducible, see 225c5f01b2fSopenharmony_ci# <https://content.pivotal.io/blog/barriers-to-deterministic-reproducible-zip-files>. 226c5f01b2fSopenharmony_ciinclude.zip: 227c5f01b2fSopenharmony_ci zip -9 --recurse-paths -X include.zip $(SRCS) $(AMALGAMATED_FILE) meson.build LICENSE.MIT 228c5f01b2fSopenharmony_ci 229c5f01b2fSopenharmony_ci# Create the files for a release and add signatures and hashes. 230c5f01b2fSopenharmony_cirelease: include.zip json.tar.xz 231c5f01b2fSopenharmony_ci rm -fr release_files 232c5f01b2fSopenharmony_ci mkdir release_files 233c5f01b2fSopenharmony_ci gpg --armor --detach-sig include.zip 234c5f01b2fSopenharmony_ci gpg --armor --detach-sig $(AMALGAMATED_FILE) 235c5f01b2fSopenharmony_ci gpg --armor --detach-sig $(AMALGAMATED_FWD_FILE) 236c5f01b2fSopenharmony_ci gpg --armor --detach-sig json.tar.xz 237c5f01b2fSopenharmony_ci cp $(AMALGAMATED_FILE) release_files 238c5f01b2fSopenharmony_ci cp $(AMALGAMATED_FWD_FILE) release_files 239c5f01b2fSopenharmony_ci mv $(AMALGAMATED_FILE).asc $(AMALGAMATED_FWD_FILE).asc json.tar.xz json.tar.xz.asc include.zip include.zip.asc release_files 240c5f01b2fSopenharmony_ci cd release_files ; shasum -a 256 json.hpp include.zip json.tar.xz > hashes.txt 241c5f01b2fSopenharmony_ci 242c5f01b2fSopenharmony_ci 243c5f01b2fSopenharmony_ci########################################################################## 244c5f01b2fSopenharmony_ci# Maintenance 245c5f01b2fSopenharmony_ci########################################################################## 246c5f01b2fSopenharmony_ci 247c5f01b2fSopenharmony_ci# clean up 248c5f01b2fSopenharmony_ciclean: 249c5f01b2fSopenharmony_ci rm -fr fuzz fuzz-testing *.dSYM tests/*.dSYM 250c5f01b2fSopenharmony_ci rm -fr benchmarks/files/numbers/*.json 251c5f01b2fSopenharmony_ci rm -fr cmake-build-benchmarks fuzz-testing cmake-build-pvs-studio release_files 252c5f01b2fSopenharmony_ci $(MAKE) clean -Cdocs 253c5f01b2fSopenharmony_ci 254c5f01b2fSopenharmony_ci 255c5f01b2fSopenharmony_ci########################################################################## 256c5f01b2fSopenharmony_ci# Thirdparty code 257c5f01b2fSopenharmony_ci########################################################################## 258c5f01b2fSopenharmony_ci 259c5f01b2fSopenharmony_ciupdate_hedley: 260c5f01b2fSopenharmony_ci rm -f include/nlohmann/thirdparty/hedley/hedley.hpp include/nlohmann/thirdparty/hedley/hedley_undef.hpp 261c5f01b2fSopenharmony_ci curl https://raw.githubusercontent.com/nemequ/hedley/master/hedley.h -o include/nlohmann/thirdparty/hedley/hedley.hpp 262c5f01b2fSopenharmony_ci $(SED) -i 's/HEDLEY_/JSON_HEDLEY_/g' include/nlohmann/thirdparty/hedley/hedley.hpp 263c5f01b2fSopenharmony_ci grep "[[:blank:]]*#[[:blank:]]*undef" include/nlohmann/thirdparty/hedley/hedley.hpp | grep -v "__" | sort | uniq | $(SED) 's/ //g' | $(SED) 's/undef/undef /g' > include/nlohmann/thirdparty/hedley/hedley_undef.hpp 264c5f01b2fSopenharmony_ci $(SED) -i '1s/^/#pragma once\n\n/' include/nlohmann/thirdparty/hedley/hedley.hpp 265c5f01b2fSopenharmony_ci $(SED) -i '1s/^/#pragma once\n\n/' include/nlohmann/thirdparty/hedley/hedley_undef.hpp 266c5f01b2fSopenharmony_ci $(MAKE) amalgamate 267c5f01b2fSopenharmony_ci 268c5f01b2fSopenharmony_ci########################################################################## 269c5f01b2fSopenharmony_ci# serve_header.py 270c5f01b2fSopenharmony_ci########################################################################## 271c5f01b2fSopenharmony_ci 272c5f01b2fSopenharmony_ciserve_header: 273c5f01b2fSopenharmony_ci ./tools/serve_header/serve_header.py --make $(MAKE) 274c5f01b2fSopenharmony_ci 275c5f01b2fSopenharmony_ci########################################################################## 276c5f01b2fSopenharmony_ci# REUSE 277c5f01b2fSopenharmony_ci########################################################################## 278c5f01b2fSopenharmony_ci 279c5f01b2fSopenharmony_cireuse: 280c5f01b2fSopenharmony_ci pipx run reuse addheader --recursive single_include include -tjson --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2022" 281c5f01b2fSopenharmony_ci pipx run reuse addheader $(TESTS_SRCS) --style=c -tjson_support --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2022" 282c5f01b2fSopenharmony_ci pipx run reuse lint 283