add online examples

This commit is contained in:
Niels 2015-06-29 23:02:41 +02:00
parent 540c58964d
commit 5ae2babf61
81 changed files with 239 additions and 1 deletions

View file

@ -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)