-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
58 lines (41 loc) · 1.55 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
RUBBER_INFO = rubber-info
RUBBER = rubber --unsafe -m graphics -m xelatex --warn=refs --warn=misc
.SECONDARY:
SHELL = /bin/bash -eu
-include Makefile.local
all: annotated-presentation-skim.pdf presentation-skim.pdf
skim: annotated-presentation-skim.pdf
open -a /Applications/Skim.app $<
annotated-presentation.pdf: presentation.tex
.PHONY: .FORCE
annotated-presentation.pdf: labels.aux
labels.aux: presentation-skim.pdf
grep '^\\newlabel' presentation.aux > $@ ||:
%.pdf: %.tex .FORCE
#iconv -f UTF-8 -t US-ASCII $< > /dev/null
${RUBBER} $<
if grep -q 'fourupslides Warning: $*-skim.pdf not found' $*.log; then \
cat $@ > $*-skim.pdf; \
${RUBBER} --force $<; \
fi
$(EXTRA_CMDS)
%-skim.pdf: %.pdf
cat $< > $@
clean::
rm -f *.aux *.log *.snm *.toc *.nav *.out *.toc *.vrb \
{annotated-,}presentation*.pdf \
transcript.tex transcript*.pdf
realclean:: clean
rm -f {annotated-,}presentation-skim.pdf
PYTHON_FILES = $(wildcard *.py)
presentation.pdf: $(PYTHON_FILES:%.py=%.py.include)
clean::
rm -f *.out *.include
GH_CURL = curl -sSH "Authorization: token $$(grep oauth_token ~/.config/hub | head -n1 | awk '{print $$2}')"
upload: presentation.pdf
git tag -f v0.0.0 && git push -f --tags github.com/py-yyc/git-init
EXISTING_RELEASE_ID=$$(${GH_CURL} https://api.github.com/repos/py-yyc/git-init/releases/tags/v0.0.0 | jq .id); \
if [ -n "$$EXISTING_RELEASE_ID" ]; then \
${GH_CURL} -X DELETE https://api.github.com/repos/py-yyc/git-init/releases/$$EXISTING_RELEASE_ID; \
fi
hub release create -p -a presentation.pdf -m Slides v0.0.0