summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--doc/doc.mk10
2 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9767db2..c706f5e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,10 @@
BUILD_DIR := ./build
-all: mech
+all: doc mech
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)
+include doc/doc.mk
include mech/mech.mk
diff --git a/doc/doc.mk b/doc/doc.mk
new file mode 100644
index 0000000..059bd10
--- /dev/null
+++ b/doc/doc.mk
@@ -0,0 +1,10 @@
+DOC_BUILD_DIR := $(BUILD_DIR)/doc
+DOCS := soundbox-documentation
+PDF := $(DOCS:%=$(DOC_BUILD_DIR)/%.pdf)
+
+.PHONY: doc
+doc: $(PDF)
+
+$(BUILD_DIR)/%.pdf: %.tex
+ mkdir -p $(dir $@)
+ pdflatex -halt-on-error -output-directory $(DOC_BUILD_DIR) $<