From feda70248f41fdb584ddbdd8697a4e6b8f5dbf50 Mon Sep 17 00:00:00 2001 From: Dan Goldsmith Date: Wed, 29 Jan 2020 11:45:29 +0000 Subject: [PATCH] Makefile Tidyupp --- Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 Makefile diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..6ceccc9 --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +# Makefile for Markdown files via Pandoc +# Modified for the Final Year Project build + +# You can uncomment change this to the Top level file, if you want to +# build using just Make Alternativly, Make .pdf SOURCES = +# Dissertation.md TARGET = Dissertaion.pdf + +#If you move the template directory, update the link here +TEMPLATE_DIR = Template + +# ----------- DO NOT MODIFY BELOW HERE -------------- + +TEMPLATE_FILE = $(TEMPLATE_DIR)/disso.latex + +#Report Export Options +PDF_PANDOC_OPTIONS = --filter=pandoc-citeproc --template=$(TEMPLATE_FILE) --top-level-division=chapter + +TEX_PANDOC_OPTIONS = --template=$(TEMPLATE_FILE) --top-level-division=chapter --biblatex + +#Default Sources to the input provide +ifndef SOURCES + SOURCES = $< +endif + +ifndef TARGET + TARGET = $@ +endif + +#Build a PDF from the relevant sources +#%.pdf: %.md +%.pdf: %.md + pandoc $(PDF_PANDOC_OPTIONS) $(SOURCES) -o $(TARGET) + + +%.html: %.md + pandoc $(HTML_PANDOC_OPTIONS) $(SOURCES) -o $(TARGET) + +%.tex: %.md + + pandoc $(TEX_PANDOC_OPTIONS) -s $(SOURCES) -o $(TARGET)