From c35db75eba1f67c6d6bbca9fefe7aaefb6b6d6e9 Mon Sep 17 00:00:00 2001 From: Peter Ward Date: Sun, 29 Jul 2012 23:43:29 +1000 Subject: Add start of tutorial. --- docs/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/Makefile (limited to 'docs/Makefile') diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..8ea7df2 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,27 @@ +BUILD_DIR = build + +FILES = $(wildcard *.tex *.py) +BUILD_FILES = $(patsubst %,${BUILD_DIR}/%,${FILES}) + +LATEX=xelatex +LATEX_FLAGS=-shell-escape + +.PHONY: all + +all: tutorial.pdf + +${BUILD_DIR}: + mkdir -p ${BUILD_DIR} + +${BUILD_DIR}/%.tex: %.tex ${BUILD_DIR} + ./jinja2 --latex < $< > $@ + +${BUILD_DIR}/%.py: %.py + ln $< $@ + +tutorial.pdf: ${BUILD_DIR}/tutorial.tex ${BUILD_FILES} + cd "${BUILD_DIR}" && \ + ${LATEX} ${LATEX_FLAGS} tutorial + mv -f "${BUILD_DIR}/tutorial.pdf" tutorial.pdf +# ${LATEX} ${LATEX_FLAGS} tutorial && \ +# ${LATEX} ${LATEX_FLAGS} tutorial && \ -- cgit v1.2.3