Created
January 3, 2017 20:18
-
-
Save ibnesayeed/967fd62743f46f41f534be4b14f6e300 to your computer and use it in GitHub Desktop.
Makefile to compile LaTeX
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