forked from anshulvp/nyu-phd-thesis-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (56 loc) · 1.72 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
60
61
62
63
64
65
66
67
# --------------------------------------------------------------------
# Usage:
#
# all make pdf file
# pdf make pdf file
# clean remove files
# clobber remove everything
# check doubled word and latex syntax check
# wc word count
# --------------------------------------------------------------------
NAME := thesis
BIBFILES := thesis.bib
TEXFILES := thesis.tex
DISTILLER := ps2pdf
# --------------------------------------------------------------------
SHELL := bash
LATEX := pdflatex
BIBTEX := bibtex -min-crossrefs=100 # avoid separating out crossrefs
DETEX := detex -n
LACHECK := lacheck
DW := dw # ftp://ftp.math.utah.edu/pub/misc/dw.tar.gz
RM := rm -f
WC := wc
# --------------------------------------------------------------------
all: $(NAME).pdf $(BIBFILES) $(TEXFILES)
pdf: $(NAME).pdf
check: dw syn
$(NAME).pdf: $(NAME).tex $(BIBFILES)
@echo '-------------------- latex #1 --------------------'
$(LATEX) $(NAME).tex
@echo '-------------------- bibtex --------------------'
$(BIBTEX) $(NAME)
@echo '-------------------- latex #2 --------------------'
$(LATEX) $(NAME).tex
@echo '-------------------- latex #3 --------------------'
$(LATEX) $(NAME).tex
@echo '-------------------- latex #4 --------------------'
$(LATEX) $(NAME).tex
dw:
@-$(RM) $(NAME).dw
@echo '-------------------- doubled words --------------------'
@for f in $(NAME).tex ;\
do \
echo ----- $$f ----- ; \
echo ----- $$f ----- >> $(NAME).dw ; \
$(DETEX) $$f | $(DW) >> $(NAME).dw ; \
done
syn:
@echo '-------------------- syntax check --------------------'
@$(LACHECK) $(NAME).tex
wc:
@$(DETEX) $(NAME).tex | $(WC)
clean:
$(RM) *.{blg,dvi,dw,ilg,log,o,tmp,lbl,aux,bbl,idx,ind,toc,lof,lot,brf,out} thesis.pdf
clobber: clean
$(RM) *~ \#* core