2018-11-26 08:46:50 -08:00
|
|
|
BOB_SRCS=$(wildcard art/*.bob)
|
2019-05-28 14:02:04 -07:00
|
|
|
MSC_SRCS=$(wildcard art/*.msc)
|
2018-11-26 08:46:50 -08:00
|
|
|
MD_SRCS=$(wildcard src/*.md)
|
|
|
|
|
2019-05-28 14:02:04 -07:00
|
|
|
SVG_IMGS=$(BOB_SRCS:art/%.bob=src/img/%.svg) $(MSC_SRCS:art/%.msc=src/img/%.svg)
|
2018-11-26 08:46:50 -08:00
|
|
|
|
|
|
|
all: html/index.html
|
|
|
|
|
|
|
|
test: src/tests.ok
|
|
|
|
|
|
|
|
open: all
|
|
|
|
mdbook build --open
|
|
|
|
|
|
|
|
watch: $(SVG_IMGS)
|
|
|
|
mdbook watch
|
|
|
|
|
|
|
|
src/img/%.svg: art/%.bob
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
svgbob < $< > $@
|
|
|
|
|
2019-05-28 14:02:04 -07:00
|
|
|
src/img/%.svg: art/%.msc
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
mscgen -T svg -i $< -o $@
|
|
|
|
|
2018-11-26 08:46:50 -08:00
|
|
|
src/%.md: %.md
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
@cp $< $@
|
|
|
|
|
|
|
|
src/tests.ok: $(SVG_IMGS) $(MD_SRCS)
|
|
|
|
mdbook test
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
html/index.html: src/tests.ok
|
|
|
|
mdbook build
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(SVG_IMGS) src/tests.ok
|
|
|
|
rm -rf html
|