forked from BITNP/BIThesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (40 loc) · 1.08 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
58
59
PACKAGE = bithesis
LATEX = xelatex
SOURCES = $(PACKAGE).ins $(PACKAGE).dtx
CLSFILE = dtx-style.sty bitart.cls bitbook.cls
LATEXMK = latexmk
SCAFFOLDDIR = ../BIThesis-scaffold
# make deletion work on Windows
ifdef SystemRoot
RM = del /Q
else
RM = rm -f
endif
.PHONY: all cls doc clean FORCE_MAKE copy
$(PACKAGE).pdf: cls FORCE_MAKE
$(LATEXMK) -xelatex $(PACKAGE).dtx
$(CLSFILE): $(SOURCES)
yes y | xetex $(PACKAGE).ins
cls: $(CLSFILE)
doc: $(PACKAGE).pdf
viewdoc: doc
$(LATEXMK) -pv $(PACKAGE).dtx
clean:
$(LATEXMK) -c $(PACKAGE).dtx
-@$(RM) -r *.glo $(CLSFILE) _minted-bithesis
clean-dist:
-@$(RM) -r $(PACKAGE).pdf
clean-all: clean clean-dist FORCE_MAKE
copy:
cp bitbook.cls $(SCAFFOLDDIR)/graduation-thesis
cp bitart.cls $(SCAFFOLDDIR)/lab-report
cp bitart.cls $(SCAFFOLDDIR)/proposal-report
dev:
ls bithesis.dtx | entr -s 'yes y | make doc && make copy'
dev-doc:
ls bithesis.dtx | entr -s 'make clean-all && yes y | make doc && open bithesis.pdf'
pkg: doc
rm -rf ./bithesis
mkdir bithesis
cp bithesis.{ins,dtx,pdf} *.md ./bithesis
zip -r bithesis.zip bithesis