-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
executable file
·32 lines (25 loc) · 858 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
# Identify what is the name of the *.tex file to compile
# NOTE: There must be a single *.tex file in the current directory
FILE_TEX=$(wildcard *.tex)
TARGET=$(FILE_TEX:.tex=)
################################
################################
# Rule that runs whether the make is called or the *.dvi file is outdated. It compiles the fist prereq. ($<): the *.tex encountered
#open $(TARGET).pdf
FORCE: $(FILE_TEX)
pdflatex --shell-escape $<
# Rule for cleaning: It removes all the files with TARGET name except the file with *.tex extension
.PHONY: clean
clean:
rm -f $(filter-out $(TARGET).tex, $(wildcard $(TARGET).*))
.PHONY: cleanall
cleanall:
rm -f $(filter-out $(wildcard tikz/*.tex), $(wildcard tikz/*.*))
# Rule with echo for testing
.PHONY: echo
echo:
echo $(FILE_TEX)
# Rule to create a bibtex file
.PHONY: bib
bib:
biber $(TARGET).bcf