forked from btskinner/tex_cv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·38 lines (30 loc) · 870 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
# Makefile for CV
FILENAME = cv # basename of your cv and bib file (same name)
TEX = pdflatex
BIB = biber
PDF = $(addsuffix .pdf, $(strip $(FILENAME)))
EXT = .aux .bbl .bcf .blg .log .out .run.xml
AUX = $(addprefix $(strip $(FILENAME)),$(strip $(EXT)))
.PHONY : all clean cleanall view
all: $(PDF)
view:
@open $(PDF)
%.pdf: %.tex %.bib
@echo "\n==> Building $@"
@echo " - pdflatex $< (pass 1/3)"
@$(TEX) $< > /dev/null
@echo " - biber $(basename $@)"
@$(BIB) $(basename $(word 2,$^)) > /dev/null
@echo " - pdflatex $< (pass 2/3)"
@$(TEX) $< > /dev/null
@echo " - pdflatex $< (pass 3/3)"
@$(TEX) $< > /dev/null
@echo "==> Success!\n"
clean:
@echo "\n==> Cleaning directory of auxilary files\n"
@rm -f $(AUX)
cleanall:
@echo "\n==> Cleaning directory of auxilary files"
@rm -f $(AUX)
@echo "==> Removing pdf file\n"
@rm -f $(PDF)