# The Testament — Build System
# Requires: pandoc, texlive-xetex (or mactex on macOS)

.PHONY: all pdf epub md clean

all: md pdf epub

md:
	python3 build/build.py --md

pdf:
	python3 build/build.py --pdf

epub:
	python3 build/build.py --epub

clean:
	rm -rf build/output build/the-testament-full.md

watch:
	@echo "Watching for changes..."
	@while true; do \
		inotifywait -q -e modify chapters/*.md 2>/dev/null || sleep 5; \
		make md; \
	done
