summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-10-17 20:30:02 +0200
committerNao Pross <naopross@thearcway.org>2017-10-17 20:30:02 +0200
commitb0c16711c5b79a95309b5bc0fa86156033e1c173 (patch)
tree0f0c7ba04774ee4bcfed3a2569169ea63305c2d8 /makefile
downloadLFC-b0c16711c5b79a95309b5bc0fa86156033e1c173.tar.gz
LFC-b0c16711c5b79a95309b5bc0fa86156033e1c173.zip
First commit
Diffstat (limited to 'makefile')
-rw-r--r--makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..1d79099
--- /dev/null
+++ b/makefile
@@ -0,0 +1,30 @@
+# file settings
+BUILD_DIR := build
+DRAFT := lfc_draft.pdf
+FINAL := lfc_final.pdf
+
+# tex settings
+TEX := pdflatex \
+ -interaction=nonstopmode \
+ -halt-on-error \
+ -output-directory=$(BUILD_DIR)
+
+# automated stuff
+_DRAFT := $(BUILD_DIR)/$(DRAFT)
+_DRAFT_SRC := $(patsubst %.pdf,%.tex,$(DRAFT))
+
+_FINAL := $(BUILD_DIR)/$(FINAL)
+_FINAL_SRC := $(patsubst %.pdf,%.tex,$(FINAL))
+
+# recipes
+.PHONY: build_dir
+all: $(_DRAFT)
+
+$(_DRAFT): $(_DRAFT_SRC) build_dir
+ $(TEX) $<
+
+$(_FINAL): $(_FINAL_SRC) build_dir
+ $(TEX) $<
+
+build_dir:
+ mkdir -p $(BUILD_DIR)