summaryrefslogtreecommitdiff
path: root/Makefile
blob: ed7226f53e2776b89eb988ddb820c063d9ebfbc8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
TEX=pdflatex
TEXFLAGS=-file-line-error -halt-on-error

TARGET=$(subst .tex,.pdf,$(wildcard *.tex)) $(subst .tex,-short.pdf,$(wildcard *.tex))

.PHONY: all clean

all: $(TARGET)

%-short.pdf: %.tex handouts.sty
	$(TEX) $(TEXFLAGS) -jobname=$(basename $<)-short '\let\ifshownotes\iffalse\let\ifshowcriticism\iffalse\input{$<}'
	$(TEX) $(TEXFLAGS) -jobname=$(basename $<)-short '\let\ifshownotes\iffalse\let\ifshowcriticism\iffalse\input{$<}'

%.pdf: %.tex handouts.sty
	$(TEX) $(TEXFLAGS) $<
	$(TEX) $(TEXFLAGS) $<

clean:
	latexmk -C