-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (24 loc) · 1.01 KB
/
Makefile
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
28
29
all: tket.tds.zip
DOC_SOURCES = $(wildcard doc/*.tex)
TEX_SOURCES = $(wildcard src/*.eps src/*.pdf src/tket.sty)
tket.tds.zip: doc/tket-doc.pdf $(DOC_SOURCES) $(TEX_SOURCES)
mkdir -p tket.tds/doc/tex/latex/tket
cp doc/tket-doc.pdf $(DOC_SOURCES) tket.tds/doc/tex/latex/tket
mkdir -p tket.tds/tex/latex/tket
cp $(TEX_SOURCES) tket.tds/tex/latex/tket
zip -r tket.tds.zip tket.tds
rm -r tket.tds
doc/tket-doc.pdf: doc/tket-doc.tex
TEXINPUTS=../src/: \
latexmk -cd -pdf -shell-escape doc/tket-doc.tex
# File containing dependencies, generated by latexmk
doc/tket-doc.d: doc/tket-doc.tex
TEXINPUTS=../src/: \
latexmk -cd -pdf -shell-escape -deps-out=doc/tket-doc.d doc/tket-doc.tex
# Remove dependencies inadvertently picked up from minted by latexmk
sed -i -e '/_minted-tket-doc/ d' $@
# Add doc/ in front of all relative paths
sed -i -e 's@^\( *\)\([^\\# /]\)@\1doc/\2@' $@
# Remove dependencies inadvertently picked up from minted by latexmk
sed -i -e 's@doc/tket-doc\.\(aex\|w18\)@@' $@
include doc/tket-doc.d