From 6a76f57432dd942cc68b248486a28c523c4dd382 Mon Sep 17 00:00:00 2001 From: mjkwiatkowski Date: Thu, 5 Feb 2026 19:30:08 +0100 Subject: initial commit --- Makefile | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a0f9602 --- /dev/null +++ b/Makefile @@ -0,0 +1,63 @@ +# Configuration +NAME = Thesis +MAIN = thesis.tex +BUILD_DIR = build + +# Do not change below this line +# -------------------------------------------------------------------- + +.PHONY: pdf clean zip init +SOURCES = $(wildcard *.tex) $(wildcard content/*) $(wildcard style/*) $(wildcard images/*) $(wildcard/appendix/*) $(wildcard main.bib) +ARCHIVE=$(NAME).zip +LATEX=pdflatex -halt-on-error -interaction=nonstopmode -output-directory $(BUILD_DIR) -jobname=$(NAME) $(MAIN) >/dev/null +BIB=bibtex $(BUILD_DIR)/$(NAME) +GLOSSARIES=makeglossaries -d $(BUILD_DIR) $(NAME) >/dev/null + +pdf: $(BUILD_DIR)/$(NAME).pdf + +# Rule to build the PDF +# Need to run pdflatex three times to get the references right +$(BUILD_DIR)/$(NAME).pdf: $(SOURCES) $(BUILD_DIR) + @echo "Building PDF..." + @$(LATEX) + $(BIB) + $(GLOSSARIES) + @$(LATEX) + $(LATEX) + +$(BUILD_DIR): + mkdir -p $@ + +# Zip target +zip: $(NAME).zip + +$(NAME).zip: $(SOURCES) + zip -r $(NAME).zip $(SOURCES) + +# Clean rule +clean: + trash -f $$(tr '\n' ' ' < .gitignore) + +# Create new project +init: LICENSE + +LICENSE: + @echo -e "*.aux\\n\ +*.bbl\\n\ +*.brf\\n\ +*.nlo\\n\ +*.blg\\n\ +*.log\\n\ +*.fls\\n\ +*.fdb_latexmk\\n\ +*.toc\\n\ +*.lof\\n\ +*.lot\\n\ +*.out\\n\ +*.tdo\\n\ +main.synctex.gz\\n\ +main.pdf\\n\ +.idea\\n\ +out\\n\ +*.zip\\n\ +build" > .gitignore -- cgit v1.2.3