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)
|
2020-03-04 16:44:30 -08:00
|
|
|
MD_SRCS=$(wildcard src/*.md src/*/*.md) src/cli/usage.md
|
2018-11-26 08:46:50 -08:00
|
|
|
|
2019-09-21 22:18:59 -07:00
|
|
|
SVG_IMGS=$(BOB_SRCS:art/%.bob=src/.gitbook/assets/%.svg) $(MSC_SRCS:art/%.msc=src/.gitbook/assets/%.svg)
|
2018-11-26 08:46:50 -08:00
|
|
|
|
2019-06-27 15:20:37 -07:00
|
|
|
TARGET=html/index.html
|
|
|
|
TEST_STAMP=src/tests.ok
|
2018-11-26 08:46:50 -08:00
|
|
|
|
2019-06-27 15:20:37 -07:00
|
|
|
all: $(TARGET)
|
2018-11-26 08:46:50 -08:00
|
|
|
|
2019-09-21 07:59:36 -07:00
|
|
|
svg: $(SVG_IMGS)
|
|
|
|
|
2019-06-27 15:20:37 -07:00
|
|
|
test: $(TEST_STAMP)
|
|
|
|
|
|
|
|
open: $(TEST_STAMP)
|
2018-11-26 08:46:50 -08:00
|
|
|
mdbook build --open
|
2020-05-13 09:08:25 -07:00
|
|
|
./set-solana-release-tag.sh
|
2018-11-26 08:46:50 -08:00
|
|
|
|
|
|
|
watch: $(SVG_IMGS)
|
|
|
|
mdbook watch
|
|
|
|
|
2019-09-21 22:18:59 -07:00
|
|
|
src/.gitbook/assets/%.svg: art/%.bob
|
2018-11-26 08:46:50 -08:00
|
|
|
@mkdir -p $(@D)
|
|
|
|
svgbob < $< > $@
|
|
|
|
|
2019-09-21 22:18:59 -07:00
|
|
|
src/.gitbook/assets/%.svg: art/%.msc
|
2019-05-28 14:02:04 -07:00
|
|
|
@mkdir -p $(@D)
|
|
|
|
mscgen -T svg -i $< -o $@
|
|
|
|
|
2020-03-04 16:44:30 -08:00
|
|
|
../target/debug/solana:
|
|
|
|
cd ../cli && cargo build
|
|
|
|
|
|
|
|
src/cli/usage.md: build-cli-usage.sh ../target/debug/solana
|
|
|
|
./$<
|
|
|
|
|
2018-11-26 08:46:50 -08:00
|
|
|
src/%.md: %.md
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
@cp $< $@
|
|
|
|
|
2019-06-27 15:20:37 -07:00
|
|
|
$(TEST_STAMP): $(TARGET)
|
2018-11-26 08:46:50 -08:00
|
|
|
mdbook test
|
|
|
|
touch $@
|
|
|
|
|
2019-06-27 15:20:37 -07:00
|
|
|
$(TARGET): $(SVG_IMGS) $(MD_SRCS)
|
2018-11-26 08:46:50 -08:00
|
|
|
mdbook build
|
2020-05-13 09:08:25 -07:00
|
|
|
./set-solana-release-tag.sh
|
2018-11-26 08:46:50 -08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(SVG_IMGS) src/tests.ok
|
|
|
|
rm -rf html
|