forked from tigerneil/dlbook-zh-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (42 loc) · 985 Bytes
/
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
# Makefile
#
TEX = xelatex
MKIDX = makeindex
MKBIB = bibtex
MKGLS = makeglossaries
RM = rm -rf
MAKE = make
TARGET = dlbook.pdf
SOURCES := $(wildcard *.tex)
FIGURESDEPS := $(wildcard figures/*.eps)
FIGURESDEPS := $(wildcard figures/*.pdf)
FIGURESDEPS += $(wildcard figures/*.png)
FIGURESDEPS += $(wildcard figures/*.jpg)
CONTENTS := $(wildcard contents/*.tex)
.PHONY: all
all: $(TARGET)
$(TARGET): $(SOURCES) $(FIGURESDEPS) $(CONTENTS) dlbook-complete.bib
$(TEX) $(basename $@)
$(MKBIB) $(basename $@)
$(MKIDX) $(basename $@)
$(MKGLS) $(basename $@)
$(TEX) $(basename $@) # compile twice to make sure the toc is generated
$(TEX) $(basename $@) # compile 3 times to make sure index/bibliography/glossary files are generated
clean:
# $(MAKE) -C graphics clean
$(RM) *.pdf
$(RM) *.aux
$(RM) *.log
$(RM) *.out
$(RM) *.toc
$(RM) *.idx
$(RM) *.ilg
$(RM) *.ind
$(RM) *.glg
$(RM) *.glo
$(RM) *.gls
$(RM) *.xdy
$(RM) *.bbl
$(RM) *.blg
$(RM) *.run.xml
$(RM) *-blx.bib