Last active
December 12, 2015 02:48
-
-
Save helloIAmPau/4701057 to your computer and use it in GitHub Desktop.
Makefile used to automate the building of latex projects
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
all: view | |
single: quiet | |
open "/tmp/`basename '$(CURDIR)'`"/*.pdf | |
quiet: | |
mkdir -p "/tmp/`basename '$(CURDIR)'`" | |
pdflatex -output-directory="/tmp/`basename '$(CURDIR)'`" main.tex | |
view: quiet | |
make quiet | |
open "/tmp/`basename '$(CURDIR)'`"/*.pdf | |
thesis: quiet | |
makeglossaries -d "/tmp/`basename '$(CURDIR)'`" main | |
bibtex "/tmp/`basename '$(CURDIR)'`"/main.aux || true | |
make quiet | |
make quiet | |
deploy: thesis | |
cp "/tmp/`basename '$(CURDIR)'`"/main.pdf ./ | |
open main.pdf | |
clean: | |
rm -rf "/tmp/`basename '$(CURDIR)'`" | |
rm -rf output | |
develop: view | |
fswatch ./ "make thesis && clear && echo Ready..." | |
.PHONY: view clean deploy single develop quiet thesis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment