summaryrefslogtreecommitdiff
path: root/volume2
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2025-03-27 13:30:19 -0500
committerDanny Holman <dholman@gymli.org>2025-03-27 13:43:31 -0500
commitb99dc8255b7c8cc0a16d753e2c3bb97f2a80d5bc (patch)
treed640b2b5a22ea9b5a73f73366b7a041b63e90ca1 /volume2
downloadunix-book-b99dc8255b7c8cc0a16d753e2c3bb97f2a80d5bc.tar.gz
unix-book-b99dc8255b7c8cc0a16d753e2c3bb97f2a80d5bc.tar.zst
unix-book-b99dc8255b7c8cc0a16d753e2c3bb97f2a80d5bc.zip
Initial commit
Diffstat (limited to 'volume2')
-rw-r--r--volume2/Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/volume2/Makefile b/volume2/Makefile
new file mode 100644
index 0000000..4809d16
--- /dev/null
+++ b/volume2/Makefile
@@ -0,0 +1,35 @@
+BOOK:=volume2.pdf
+FRONTMATTER:=$(wildcard src/frontmatter/*.md)
+BACKMATTER:=$(wildcard src/backmatter/*.md)
+FMLATEX:=$(FRONTMATTER:.md=.tex)
+BMLATEX:=$(BACKMATTER:.md=.tex)
+CHAPTERS:=$(wildcard src/chapters/*.md)
+APPENDICES:=$(wildcard src/appendices/*.md)
+FIGURES:=$(wildcard src/figs/*.svg)
+PFLAGS:=--pdf-engine=xelatex \
+ --from=markdown \
+ --indented-code-classes=javascript \
+ --highlight-style=monochrome \
+ --toc=true \
+ -V mainfont="Apple Garamond" \
+ -V monofont="FreeMono" \
+ -V documentclass=book \
+ -V papersize=letter \
+ -V geometry:margin=1in
+
+.PHONY: all clean
+
+all: $(BOOK)
+
+$(BOOK): $(CHAPTERS) $(FMLATEX) $(BMLATEX) $(APPENDICES) src/title.txt $(FIGURES)
+ pandoc src/title.txt $(CHAPTERS) $(APPENDICES) $(FIGURES) -o $@ $(PFLAGS) -N -B $(FMLATEX)
+
+$(FMLATEX): $(FRONTMATTER)
+ pandoc $^ -o $@ $(PFLAGS)
+
+$(BMLATEX): $(BACKMATTER)
+ pandoc $^ -o $@ $(PFLAGS)
+
+clean:
+ $(RM) $(BOOK) $(FMLATEX) $(BMLATEX)
+