Skip to content

Instantly share code, notes, and snippets.

@dlundquist
Created October 3, 2012 03:08
Show Gist options
  • Save dlundquist/3824724 to your computer and use it in GitHub Desktop.
Save dlundquist/3824724 to your computer and use it in GitHub Desktop.
Makefile for Latex assignments
*.aux
*.log
*.dvi
*.ps
*.pdf
# place more recent assignment first in the list
ASSIGNMENTS = hw1.pdf
all: $(ASSIGNMENTS)
%.dvi: %.tex
latex $<
%.ps: %.dvi
dvips $<
%.pdf: %.ps
ps2pdf $<
.PHONY: clean print test
clean:
rm -f *.dvi *.pdf *.ps *.aux *.log
print: $(ASSIGNMENTS)
lpr $<
test: $(ASSIGNMENTS)
evince $<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment