-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 706 Bytes
/
Makefile
File metadata and controls
31 lines (24 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
NAME = course-intro
TEX = $(NAME).tex
PDF = $(NAME).pdf
SCRIPT = $(NAME).sh
all: $(PDF)
$(PDF): $(TEX) Makefile settings.tex course.tex
@echo "I: Spellchecking $<" >&2
$(MAKE) spell
@echo "I: Building $@" >&2
pdflatex $(OPTS) -shell-escape $<
@rm -f $(@:%.pdf=%-orig.pdf)
@mv $@ $(@:%.pdf=%-orig.pdf)
@echo "I: Compressing $@" >&2
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$@ $(@:%.pdf=%-orig.pdf)
@$(MAKE partial-clean)
spell: $(TEX) $(SCRIPT)
aspell -c --home-dir=. $<
aspell -c --home-dir=. $(SCRIPT)
check: $(TEX)
chktex $<
partial-clean:
rm -f *.aux *.log *.nav *.out *.snm *.toc
clean: partial-clean
rm -f *.pdf