summaryrefslogtreecommitdiffstats
path: root/techwsw/makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--techwsw/makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/techwsw/makefile b/techwsw/makefile
new file mode 100644
index 0000000..240e907
--- /dev/null
+++ b/techwsw/makefile
@@ -0,0 +1,29 @@
+# file settings
+BUILD_DIR := build
+DOCUMENT := essence_of_hwsw.tex
+
+# tex settings
+TEX := xelatex \
+ -interaction=nonstopmode \
+ -halt-on-error \
+ -output-directory=$(BUILD_DIR)
+
+# automated stuff
+_DOCUMENT := $(BUILD_DIR)/$(DOCUMENT)
+
+_SVGS := $(shell find res/ -type f -name '*.svg')
+_PDFS := $(patsubst %.svg, %.pdf,$(_SVGS))
+
+
+# recipes
+.PHONY: build_dir
+all: $(_DOCUMENT)
+
+$(_DOCUMENT): $(DOCUMENT) $(_PDFS) build_dir
+ $(TEX) $<
+
+$(_PDFS): res/%.pdf: res/%.svg $(_SVGS)
+ inkscape -z -D --file=$< --export-pdf=$@
+
+build_dir:
+ mkdir -p $(BUILD_DIR)/tex