diff options
Diffstat (limited to 'macros/latex/contrib/exam-n/sample/Makefile')
-rw-r--r-- | macros/latex/contrib/exam-n/sample/Makefile | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/macros/latex/contrib/exam-n/sample/Makefile b/macros/latex/contrib/exam-n/sample/Makefile index 253245e534..91223625a3 100644 --- a/macros/latex/contrib/exam-n/sample/Makefile +++ b/macros/latex/contrib/exam-n/sample/Makefile @@ -1,16 +1,31 @@ +LATEX=pdflatex + +QUESTIONS=cosmo1.tex \ + cosmo2.tex \ + cosmo3.tex \ + dynamical1.tex \ + dynamical2.tex \ + dynamical3.tex \ + excos1.tex \ + numerical1.tex \ + numerical2.tex \ + numerical3.tex + %.pdf: %.tex ../exam-n.cls - TEXINPUTS=..: pdflatex $< - if grep 'Rerun to get cross' ${<:.tex=.log}; then TEXINPUTS=..: pdflatex $<; else :; fi + TEXINPUTS=..: $(LATEX) $< + if grep 'Rerun to get cross' ${<:.tex=.log}; then TEXINPUTS=..: $(LATEX) $<; else :; fi all: sample_exam.pdf -sample_exam.pdf: numerical1-solution.pdf +sample_exam.pdf: numerical1-solution.pdf $(QUESTIONS) -sample_exam_solution.pdf: sample_exam_solution.tex +sample_exam_solution.pdf: sample_exam_solution.tex $(QUESTIONS) sample_exam_solution.tex: sample_exam.tex rm -f $@ - sed '1s/documentclass/documentclass[showsolutions]/' sample_exam.tex >sample_exam_solution.tex + sed -e '1s/documentclass\[/documentclass[showsolutions,/' \ + -e '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 |