Created
August 17, 2020 08:49
-
-
Save SamuelMarks/226a60f3713df7b8f680197571c4700c to your computer and use it in GitHub Desktop.
Thesis Makefile. Entire Thesis will be open-sourced once the university has accepted it.
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 := bash | |
SRC_FILES = $(filter-out Thesis.tex, $(wildcard *.tex)) | |
.PHONY: Thesis.pdf all clean | |
all: $(patsubst %.dot,%.svg,$(wildcard *.dot)) Thesis.pdf | |
%.tex: | |
for name in *.tex; do | |
echo '$< =' "$<" '$name =' "$name" | |
done | |
#bibtex "$<" | |
Thesis.pdf: # Thesis.bbl # Thesis.tex # $(SRC_FILES) | |
latexmk -pdf -quiet -silent -use-make Thesis.tex | |
notify_macos: | |
osascript -e 'tell application "Terminal" to display notification "Built" with title "Makefile"' | |
notify_linux: | |
notify-send 'Makefile' 'Built' --icon='dialog-information' | |
notify_windows: | |
msg * "Makefile: built" | |
bibtex: | |
for src in $(basename $(SRC_FILES)); do | |
latex "$$src" && bibtex "$$src"; \ | |
done | |
Thesis.bbl: | |
pdflatex Thesis | |
pdflatex Thesis | |
# dvipdfm Thesis | |
bibtex Thesis | |
%.svg: %.dot | |
dot -Tsvg $< -o $@ | |
%.acr: | |
makeglossaries $(basename $@) | |
#%.bib: | |
# bibtex $(basename $@) | |
clean: | |
latexmk -C | |
$(RM) -f *.aux *.blg *.bbl *.log *.out *.toc *.synctex.gz *.fls *.fdb_latexmk *.nlo *.swp *.glg *.gls* *.ist *.xdy *.alg *.acn *.glo *.acr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment