2023-08-05 18:54:02 +00:00
|
|
|
chapters := note 01 02 03 04 05 06 07 08 09 10 11 12 appendix
|
2023-08-04 01:19:07 +00:00
|
|
|
edited_chapters := $(foreach chapter,$(chapters),edited/$(chapter).markdown)
|
2023-08-05 22:11:55 +00:00
|
|
|
tex_chapters := $(foreach chapter,$(chapters),tex/$(chapter).tex)
|
2023-08-04 01:19:07 +00:00
|
|
|
|
2023-08-05 22:11:55 +00:00
|
|
|
|
|
|
|
book.pdf: $(tex_chapters) book.tex Makefile
|
|
|
|
pdflatex book.tex
|
2023-08-04 01:19:07 +00:00
|
|
|
|
|
|
|
edited/%.markdown: original/%.markdown edit-chapter.go Makefile
|
|
|
|
go run edit-chapter.go $< $@
|
|
|
|
|
2023-08-05 22:11:55 +00:00
|
|
|
tex/%.tex: edited/%.markdown Makefile
|
|
|
|
pandoc -o $@ $< --top-level-division=chapter
|
|
|
|
|
2023-08-05 22:35:14 +00:00
|
|
|
.PHONY: tex
|
2023-08-05 22:11:55 +00:00
|
|
|
tex: $(tex_chapters)
|
2023-08-05 22:35:14 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
$(RM) $(edited_chapters) $(tex_chapters) book.pdf *.aux *.log *.out
|