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
|
# vim:ts=4:sw=4
#
# Copyright (c) 2008-2009 solvethis
# Copyright (c) 2010-2012 Casper Ti. Vector
# Public domain.
# ±»±àÒëµÄÖ÷ÎļþµÄÎļþÃû£¬²»°üÀ¨À©Õ¹Ãû¡£
JOBNAME = thesis
# Õâ¸ö±äÁ¿µÄÖµ¿ÉÒÔΪ latex¡¢pdflatex »ò xelatex¡£
LATEX = latex
# Èç¹ûÎÞ·¨Ê¹Óà biber£¬¿ÉÒÔ¸ÄΪ¡°bibtex¡±¡£
BIBTEX = biber -l zh__pinyin
GBK2UNI = gbk2uni
DVIPDF = dvipdfmx
# Èç¹ûÓà LaTeX ±àÒ룬ÔòʹÓà dvipdfmx ½« dvi ת³É pdf¡£
ifeq ($(LATEX), latex)
DODVIPDF = $(DVIPDF) $(JOBNAME)
endif
# ʹÓà GBK ±àÂëºÍ pdflatex ±àÒ뷽ʽʱ£¬¿ÉÄÜÐèҪʹÓà gbk2uni ת»» .out
# Îļþ±àÂ룬ÒÔ·ÀÊéÇ©ÂÒÂë¡£
ifeq ($(LATEX), pdflatex)
# ¿¼Âǵ½¿ÉÄÜÓÐÓû§Î´°²×° gbk2uni£¬ÇÒÓÐÓû§Ê¹Óà UTF-8 ±àÂ룬
# ĬÈÏÓá°#¡±×¢Ê͵ôÁË DOGBK2UNI µÄ¶¨Òå¡£
# Óû§¿ÉÒÔÊÖ¶¯È¡ÏûÆä×¢ÊÍ£¨È¥µôÏÂÒ»ÐÐÖеġ°#¡±£©¡£
#DOGBK2UNI = $(GBK2UNI) $(JOBNAME)
endif
# Çø·ÖÊÇ Windows »·¾³»¹ÊÇÀà UNIX »·¾³¡£
# Èç¹ûÊǺóÕߣ¬Ôò GNU make ½«¿ÉÒÔ¼ì²âµ½ÒѾ¶¨Òå PATH »·¾³±äÁ¿¡£
ifdef PATH
MAKE = make
RM = rm -f
else
MAKE = mingw32-make
RM = del
endif
doc:
$(LATEX) $(JOBNAME)
$(BIBTEX) $(JOBNAME)
$(DOGBK2UNI)
$(LATEX) $(JOBNAME)
$(LATEX) $(JOBNAME)
$(DODVIPDF)
clean:
$(RM) $(JOBNAME).{aux,bbl,bcf,blg,dvi,lof,log,lot,run.xml,toc,out{,.bak}} \
{missfont,texput}.log chap/*.aux
distclean: clean
$(RM) $(JOBNAME).pdf
|