Newer
Older
templates / xelatex / labs / Makefile
  1. ## Quick usage ##
  2.  
  3. # Generate everything:
  4. # >make
  5.  
  6. # Generate just the raw presentation (no page numbers)
  7. # >make quick
  8.  
  9. # Clean rubbish (leaving PDFs)
  10. # >make clean
  11.  
  12. # Clean everything (including PDFs)
  13. # >make nuke
  14.  
  15. # Compile in continuous mode
  16. # >make continuous
  17.  
  18. SOURCE=$(basename $(or $(wildcard lab*.tex), $(wildcard test*.tex), $(wildcard outline.tex), $(wildcard project*.tex),$(wildcard *exercises.tex),$(wildcard *report.tex),$(wildcard phase*.tex),$(wildcard lec*.tex)))
  19. RUBBISH=*.tmp *.xdv *.log *.up*
  20. .PHONY=clean nuke continuous quick presentation slides handout all
  21.  
  22. default: ${SOURCE}.pdf
  23.  
  24. ${SOURCE}.pdf: ${SOURCE}.tex
  25. latexmk -xelatex ${SOURCE}.tex
  26.  
  27. continuous:
  28. latexmk -xelatex -pvc -pv- -interaction=nonstopmode ${SOURCE}.tex
  29.  
  30. 2up: ${SOURCE}.pdf
  31. pdfnup --frame true --a4paper --suffix 2up ${SOURCE}.pdf
  32.  
  33. clean:
  34. latexmk -c
  35. rm -f $(RUBBISH)
  36.  
  37. nuke: clean
  38. latexmk -C