json/doc/Makefile

35 lines
919 B
Makefile
Raw Normal View History

SRCDIR = ../single_include
all: create_output
2015-06-21 22:24:03 +03:00
##########################################################################
# example files
##########################################################################
# where are the example cpp files
EXAMPLES = $(wildcard examples/*.cpp)
# create output from a stand-alone example file
%.output: %.cpp
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
./$(<:.cpp=) > $@
rm $(<:.cpp=)
# compare created output with current output of the example files
%.test: %.cpp
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
./$(<:.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)
2016-05-29 15:06:43 +03:00
clean:
rm -fr $(EXAMPLES:.cpp=)
2020-08-13 11:52:20 +03:00
$(MAKE) clean -C docset
$(MAKE) clean -C mkdocs