forked from weijianwen/GitForBeginners
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
40 lines (31 loc) · 1.13 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
MAIN := gittutorial
VIEWER := open
REPOURL := https://raw.github.com/weijianwen/hpc-slides-class/master/pandoc
DOCCLASS := hpcslides
LATEX_OPT := -gg -xelatex -f
PANDOC_DIR := pandoc
PANDOC_SLIDES := -f markdown -t beamer --template=$(DOCCLASS).latex -V theme=AnnArbor -V colortheme=rose -V institute='Omni-Lab, Shanghai Jiaotong University\\{}\url{http://omnilab.sjtu.edu.cn}' -V fontsize=11pt --toc --listings --smart --reference-links --standalone
.PHONY : all clean
.PRECIOUS : %.tex
all: $(MAIN).pdf
%.pdf : %.tex $(DOCCLASS).cls $(DOCCLASS).cfg Makefile
-@latexmk $(LATEX_OPT) $*
view : $(MAIN).pdf
-@$(VIEWER) $< &
$(DOCCLASS).% :
cp -P pandoc/$@ ./
%.tex : $(DOCCLASS).latex %.mkd Makefile
@pandoc $(PANDOC_SLIDES) $*.mkd -o $@
clean:
-@latexmk -f -c $(MAIN)
-@rm *.toc *.aux *.fls *.fdb_latexmk *.out *.cfg *.cls *.latex
distclean : clean
-@rm $(MAIN).pdf
-@latexmk -f -C $(MAIN)
update :
@wget -q $(REPOURL)/$(DOCCLASS).cls -O pandoc/$(DOCCLASS).cls
@wget -q $(REPOURL)/$(DOCCLASS).cfg -O pandoc/$(DOCCLASS).cfg
@wget -q $(REPOURL)/$(DOCCLASS).latex -O pandoc/$(DOCCLASS).latex
release :
git push gitlab
git push github