Updated the makefile

This commit is contained in:
Connor
2021-12-13 23:09:22 -07:00
parent a39dea7377
commit 0342c51914
2 changed files with 16 additions and 15 deletions

View File

@@ -1,13 +1,14 @@
OPTIONS = markdown+yaml_metadata_block+smart
NOTES_DIR = prelim_notes
PDF_DIR = pdf
NOTES = $(wildcard $(NOTES_DIR)/*.md)
PDFS = $(patsubst %.md,%.pdf,$(subst $(NOTES_DIR),$(PDF_DIR),$(NOTES)))
NOTES = $(wildcard prelim_notes/*.md)
NOTES_PDFS = $(patsubst %.md,%.pdf,$(NOTES))
all: $(PDFS)
THESIS = LaTeX/thesis.tex
THESIS_PDF = thesis.pdf
$(PDF_DIR)/%.pdf: $(NOTES_DIR)/%.md pdf_dir
all: $(THESIS_PDF) $(NOTES_PDFS)
$(NOTES_PDFS): $(NOTES)
pandoc \
--variable mainfont="Roboto" \
--variable monofont="Fira Code" \
@@ -17,12 +18,12 @@ $(PDF_DIR)/%.pdf: $(NOTES_DIR)/%.md pdf_dir
-f markdown $< \
-o $@
pdf_dir:
mkdir -p $(PDF_DIR)
$(THESIS_PDF): $(THESIS)
xelatex $<
rm thesis.aux thesis.log thesis.toc
.PHONY: clean
clean: clean_pdf
clean_pdf:
rm -rf $(PDF_DIR)
clean:
rm -rf $(THESIS_PDF)
rm -rf $(NOTES_PDFS)