SHELL := /bin/sh
MAKEFLAGS += --no-print-directory

.DEFAULT_GOAL := help
.DELETE_ON_ERROR:

.PHONY: help build test check clean

help:
	@printf '%s\n' 'Usage: make -C docs build|test|check|clean' '' \
		'  build  Build the book' \
		'  test   Test book examples' \
		'  check  Test and build the book' \
		'  clean  Remove generated documentation' '' \
		'For other options, run mdbook directly from docs/.'

build:
	mdbook build

test:
	mdbook test

check: test build

clean:
	mdbook clean
