Build with make

This commit is contained in:
2023-08-03 19:19:07 -06:00
parent ff9ad5f107
commit 3e1c06bad7
4 changed files with 32 additions and 28 deletions

11
Makefile Normal file
View File

@ -0,0 +1,11 @@
chapters := 01 02 03 04 05 06 07 08 09 10 11 12 appendix
edited_chapters := $(foreach chapter,$(chapters),edited/$(chapter).markdown)
book.pdf: $(edited_chapters) title.txt Makefile
pandoc -o book.pdf title.txt $(edited_chapters) --table-of-contents --number-sections -V documentclass=book
edited/%.markdown: original/%.markdown edit-chapter.go Makefile
go run edit-chapter.go $< $@
book.tex: $(edited_chapters) title.txt Makefile
pandoc -o book.tex title.txt $(edited_chapters) --table-of-contents --number-sections -V documentclass=book