Skip to content

Instantly share code, notes, and snippets.

@youtalk
Created February 24, 2012 05:21
Show Gist options
  • Save youtalk/1897959 to your computer and use it in GitHub Desktop.
Save youtalk/1897959 to your computer and use it in GitHub Desktop.
Makefiles for compiling tex
TARGET = name
SOURECE = $(shell ls eps/*.eps)
LATEX = platex
DVIPDFM = dvipdfmx
XDVI = xdvi
.SUFFIXES: .tex .dvi .pdf
$(TARGET).dvi: $(TARGET).aux $(SOURECE)
$(LATEX) $(TARGET)
$(LATEX) $(TARGET)
.dvi.pdf: $(TARGET).dvi
$(DVIPDFM) $<
$(TARGET).aux: $(TARGET).tex
$(LATEX) $(TARGET)
pdf: $(TARGET).pdf
run: $(TARGET).dvi
$(XDVI) $(TARGET).dvi &
clean:
rm -f $(TARGET).dvi $(TARGET).toc $(TARGET).aux $(TARGET).blg $(TARGET).bbl $(TARGET).log $(TARGET).pdf *~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment