# Three decks. `toiletduck` and `toiletduck-acn` share one body and differ
# by two lines (theme + footline). `toiletduck-soc` is a separate body:
# the same argument for SOC analysts -- security fluency assumed, budget
# spent on artifacts and evasions rather than tool internals -- so it is
# rewritten rather than restyled.
#
# Two themes, one deck body. `\usetheme{duck}` is the project's own
# style; `\usetheme{acn}` matches a client house style. The slide
# content is identical -- both files differ by one line.
#
# XeLaTeX is required: the themes use fontspec.

.PHONY: all duck acn soc clean watch

all: toiletduck.pdf toiletduck-acn.pdf toiletduck-soc.pdf

duck: toiletduck.pdf
acn:  toiletduck-acn.pdf
soc:  toiletduck-soc.pdf

%.pdf: %.tex beamerthemeduck.sty beamerthemeacn.sty
	xelatex -interaction=nonstopmode -halt-on-error $<
	@# Second pass so the footline's section reference resolves.
	@xelatex -interaction=nonstopmode -halt-on-error $< >/dev/null
	@grep -c "Overfull" $*.log | sed 's/^/$*: overfull boxes /'

watch:
	latexmk -pvc -xelatex toiletduck.tex

clean:
	rm -f *.aux *.log *.nav *.out *.snm *.toc *.pdf *.png
