summaryrefslogtreecommitdiffstats
path: root/doc/report/makefile
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-03-05 22:26:57 +0100
committerNao Pross <naopross@thearcway.org>2017-03-05 22:26:57 +0100
commit5ee822c3eb28d0fe1081e4c7b2f49d5584d9e608 (patch)
treedd8152238d1d43036e4a3b00397ad3428986e3f1 /doc/report/makefile
parentdoc: added L7805ACV datasheet; hw: updated scheme (diff)
parentMerge branch 'master' of ssh://git.thearcway.org:2222/naopross/z80uPC (diff)
downloadz80uPC-5ee822c3eb28d0fe1081e4c7b2f49d5584d9e608.tar.gz
z80uPC-5ee822c3eb28d0fe1081e4c7b2f49d5584d9e608.zip
Merge branch 'master' of https://git.thearcway.org/git/naopross/z80uPC
Diffstat (limited to '')
-rw-r--r--doc/report/makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/report/makefile b/doc/report/makefile
new file mode 100644
index 0000000..e10c0b9
--- /dev/null
+++ b/doc/report/makefile
@@ -0,0 +1,29 @@
+# documents
+BUILD_DIR := build
+RES_DIR := res
+
+SOURCES := z80uPC.tex notes.tex
+DOCUMENTS := $(patsubst %.tex,$(BUILD_DIR)/%.pdf,$(SOURCES))
+
+RES_SRC := $(wildcard $(RES_DIR)/*.svg)
+RES := $(patsubst %.svg,%.pdf,$(RES_SRC))
+
+# compiler settings
+TEX := texfot lualatex
+
+# recipes
+.PHONY: all dir clean
+all: $(DOCUMENTS)
+
+$(DOCUMENTS): $(BUILD_DIR)/%.pdf: %.tex $(SOURCES) $(RES) dir
+ @printf "\nBuilding $< \n\n"
+ $(TEX) --output-directory=$(BUILD_DIR) $<
+
+$(RES): $(RES_DIR)/%.pdf: $(RES_DIR)/%.svg $(RES_SRC) dir
+ inkscape -z -D --file=$< --export-pdf=$@
+
+dir:
+ mkdir -p $(BUILD_DIR)
+
+clean:
+ rm $(BUILD_DIR)/*