mirror of
https://github.com/nlohmann/json.git
synced 2026-05-20 13:15:23 +00:00
add online examples
This commit is contained in:
@@ -24,9 +24,20 @@ EXAMPLES = $(wildcard examples/*.cpp)
|
||||
diff $@ $(<:.cpp=.output)
|
||||
rm $(<:.cpp=) $@
|
||||
|
||||
# create links to try the code online
|
||||
%.link: %.cpp
|
||||
rm -fr tmp
|
||||
mkdir tmp
|
||||
cp $(SRCDIR)/json.hpp tmp
|
||||
./send_to_wandbox.py tmp $< > $@.tmp
|
||||
/bin/echo -n "<a target=\"_blank\" href=\"`cat $@.tmp`\"><b>online</b></a>" > $@
|
||||
rm -fr tmp $@.tmp
|
||||
|
||||
# create output from all stand-alone example files
|
||||
create_output: $(EXAMPLES:.cpp=.output)
|
||||
|
||||
create_links: $(EXAMPLES:.cpp=.link)
|
||||
|
||||
# check output of all stand-alone example files
|
||||
check_output: $(EXAMPLES:.cpp=.test)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user