-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (27 loc) · 810 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
ifdef SystemRoot
RM = del /Q
FixPath = $(subst /,\,$1)
else
ifeq ($(shell uname), Linux)
RM = rm -f
FixPath = $1
endif
endif
USELESSPOSTFIX=aux,toc,out,idx,log,backup,gls,glo,glsdefs,xdy,ilg,ind,ist,acn,glg,stc*,mtc*,maf*
USELESSMATCH=*~ sop
all: MAT257.pdf clean_useless
pdf: MAT257.pdf
MAT257.pdf: *.tex
pdflatex MAT257.tex
texindy MAT257.idx
# note, run twice to ensure indexing is correct
pdflatex MAT257.tex
clean_useless:
#rm -f *.{$(USELESSPOSTFIX)} */*.{$(USELESSPOSTFIX)} *~
$(RM) *.{$(USELESSPOSTFIX)} */*.{$(USELESSPOSTFIX)} */*/*.{$(USELESSPOSTFIX)} $(USELESSMATCH)
clean: clean_useless
#rm -f *.pdf
$(RM) *.pdf
commit: MAT257.pdf clean_useless
git commit -a -m "update at `date --rfc-2822`" && git pull && git push
.PHONY: pdf clean commit clean_useless