From baca35ef4dbca5a3813108984104ff4ab682cc2a Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Thu, 27 Jun 2019 16:20:37 -0600 Subject: [PATCH] book: Make build a little less annoying (#4861) automerge --- book/build.sh | 2 +- book/makefile | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/book/build.sh b/book/build.sh index ed06ea3055..fc1b391f16 100755 --- a/book/build.sh +++ b/book/build.sh @@ -3,4 +3,4 @@ set -e cd "$(dirname "$0")" -make -j"$(nproc)" +make -j"$(nproc)" test diff --git a/book/makefile b/book/makefile index f0f31a5bf7..1e7da7628d 100644 --- a/book/makefile +++ b/book/makefile @@ -4,11 +4,14 @@ MD_SRCS=$(wildcard src/*.md) SVG_IMGS=$(BOB_SRCS:art/%.bob=src/img/%.svg) $(MSC_SRCS:art/%.msc=src/img/%.svg) -all: html/index.html +TARGET=html/index.html +TEST_STAMP=src/tests.ok -test: src/tests.ok +all: $(TARGET) -open: all +test: $(TEST_STAMP) + +open: $(TEST_STAMP) mdbook build --open watch: $(SVG_IMGS) @@ -26,11 +29,11 @@ src/%.md: %.md @mkdir -p $(@D) @cp $< $@ -src/tests.ok: $(SVG_IMGS) $(MD_SRCS) +$(TEST_STAMP): $(TARGET) mdbook test touch $@ -html/index.html: src/tests.ok +$(TARGET): $(SVG_IMGS) $(MD_SRCS) mdbook build clean: