blob: 8ea7df22f8fe63d0949d9ef6b214a2d8f0fade8b (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 && \
|