summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/exam-n/sample/Makefile
blob: 253245e53457eda1ce85a255f1b6320a677ccbed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
%.pdf: %.tex ../exam-n.cls
	TEXINPUTS=..: pdflatex $<
	if grep 'Rerun to get cross' ${<:.tex=.log}; then TEXINPUTS=..: pdflatex $<; else :; fi

all: sample_exam.pdf

sample_exam.pdf: numerical1-solution.pdf

sample_exam_solution.pdf: sample_exam_solution.tex

sample_exam_solution.tex: sample_exam.tex
	rm -f $@
	sed '1s/documentclass/documentclass[showsolutions]/' sample_exam.tex >sample_exam_solution.tex

# This will depend somehow on the .dtx file in the parent directory,
# but expressing that here second-guesses how that file is actually
# generated, so skip this ('don't repeat yourself'; also, this is only
# occasionally used while testing)
../exam-n.cls:
	cd ..; $(MAKE) exam-n.cls

clean:
	rm -f *.pdf *.log *.aux sample_exam_solution.tex