summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-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)