Build system for The Testament: - build/build.py: compiles chapters to PDF, EPUB, MD - build/metadata.yaml: book metadata - build/frontmatter.md: title page, dedication - build/backmatter.md: acknowledgments, sovereignty note - Makefile: make pdf, make epub, make md - .gitignore: build artifacts
26 lines
448 B
Makefile
26 lines
448 B
Makefile
# 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
|