Skip to content

Instantly share code, notes, and snippets.

@ibnesayeed
Created April 26, 2017 03:18
Show Gist options
  • Select an option

  • Save ibnesayeed/ffde72df9a53c59482fb5ecffa216a09 to your computer and use it in GitHub Desktop.

Select an option

Save ibnesayeed/ffde72df9a53c59482fb5ecffa216a09 to your computer and use it in GitHub Desktop.
LaTeX Build Makefile
SHELL=/bin/bash
MAIN=main
LATEX=pdflatex
BIBTEX=bibtex
DTM=$(shell date +%Y%m%d-%H%M%S)
all: clean build clear
build:
$(LATEX) $(MAIN).tex
$(BIBTEX) $(MAIN)
$(LATEX) $(MAIN).tex
$(LATEX) $(MAIN).tex
clean:
@rm -f $(MAIN).{pdf,ps,log,lot,lof,toc,out,dvi,bbl,blg} *.aux
@echo Cleared all temporary files and $(MAIN).pdf
clear:
@rm -f $(MAIN).{ps,log,lot,lof,toc,out,dvi,bbl,blg} *.aux
@echo Cleared all temporary files
draft:
@cp $(MAIN).pdf $(MAIN)-draft-$(DTM).pdf
@echo Saved the draft as: $(MAIN)-draft-$(DTM).pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment