Created
April 26, 2017 03:18
-
-
Save ibnesayeed/ffde72df9a53c59482fb5ecffa216a09 to your computer and use it in GitHub Desktop.
LaTeX Build Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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