Skip to content

Commit d0bab18

Browse files
committed
Add Makefile
1 parent 2b7663c commit d0bab18

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tex/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
NAME = FormalLanguageConstrainedReachabilityLectureNotes
2+
ENGINE = lualatex # Only `xelatex` or `lualatex` are allowed here
3+
4+
.PHONY: $(NAME).pdf clean dist-clean format
5+
6+
all: $(NAME).pdf
7+
8+
$(NAME).pdf:
9+
latexmk -$(ENGINE) -synctex=1 -interaction=nonstopmode -file-line-error -shell-escape $(NAME).tex
10+
11+
clean:
12+
latexmk -c $(NAME).tex
13+
14+
dist-clean:
15+
latexmk -C $(NAME).tex
16+
17+
# https://stackoverflow.com/a/12959694
18+
# Make does not offer a recursive wildcard function, so here's one:
19+
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
20+
21+
FILES_TO_FORMAT := $(call rwildcard,./,*.tex) \
22+
$(call rwildcard,./,*.cls) \
23+
$(call rwildcard,./,*.bib)
24+
#$(info $(FILES_TO_FORMAT))
25+
26+
format:
27+
$(foreach file, $(FILES_TO_FORMAT), latexindent -l -s -o=$(file) -m $(file);)

0 commit comments

Comments
 (0)