diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:42:50 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:42:50 +0300 |
| commit | 5fad10f89c485cfdc7b99011f07609f8871160d4 (patch) | |
| tree | 1860b39753b652dfe54d3cbbc80c875f40198d1f /json4cpp/docs/Makefile | |
| parent | 292baed7ac0cf84263263966ed32ed113cae857f (diff) | |
| parent | 9a737481aed085fd289f82dff1fa8c3c66627a7e (diff) | |
| download | Project-Tick-5fad10f89c485cfdc7b99011f07609f8871160d4.tar.gz Project-Tick-5fad10f89c485cfdc7b99011f07609f8871160d4.zip | |
Add 'json4cpp/' from commit '9a737481aed085fd289f82dff1fa8c3c66627a7e'
git-subtree-dir: json4cpp
git-subtree-mainline: 292baed7ac0cf84263263966ed32ed113cae857f
git-subtree-split: 9a737481aed085fd289f82dff1fa8c3c66627a7e
Diffstat (limited to 'json4cpp/docs/Makefile')
| -rw-r--r-- | json4cpp/docs/Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/json4cpp/docs/Makefile b/json4cpp/docs/Makefile new file mode 100644 index 0000000000..0412fb90a0 --- /dev/null +++ b/json4cpp/docs/Makefile @@ -0,0 +1,44 @@ +SRCDIR = ../single_include + +all: create_output + +########################################################################## +# example files +########################################################################## + +# where are the example cpp files +EXAMPLES = $(wildcard mkdocs/docs/examples/*.cpp) + +cxx_standard = $(lastword c++11 $(filter c++%, $(subst ., ,$1))) + +# create output from a stand-alone example file +%.output: %.cpp + @echo "standard $(call cxx_standard $(<:.cpp=))" + $(MAKE) $(<:.cpp=) \ + CPPFLAGS="-I $(SRCDIR) -DJSON_USE_GLOBAL_UDLS=0" \ + CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) -Wno-deprecated-declarations" + ./$(<:.cpp=) > $@ + rm $(<:.cpp=) + +# compare created output with current output of the example files +%.test: %.cpp + $(MAKE) $(<:.cpp=) \ + CPPFLAGS="-I $(SRCDIR) -DJSON_USE_GLOBAL_UDLS=0" \ + CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) -Wno-deprecated-declarations" + ./$(<:.cpp=) > $@ + diff $@ $(<:.cpp=.output) + rm $(<:.cpp=) $@ + +# create output from all stand-alone example files +create_output: $(EXAMPLES:.cpp=.output) + +# check output of all stand-alone example files +check_output: $(EXAMPLES:.cpp=.test) + +# check output of all stand-alone example files (exclude files with platform-dependent output.) +# This target is used in the CI (ci_test_documentation). +check_output_portable: $(filter-out mkdocs/docs/examples/meta.test mkdocs/docs/examples/max_size.test mkdocs/docs/examples/std_hash.test mkdocs/docs/examples/basic_json__CompatibleType.test,$(EXAMPLES:.cpp=.test)) + +clean: + rm -fr $(EXAMPLES:.cpp=) + $(MAKE) clean -C docset |
