-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
28 lines (20 loc) · 907 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
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
tex_files = $(call rwildcard, , *.tex)
pdf_files = $(tex_files:.tex=.pdf)
pdf_files_continous = $(tex_files:.tex=.pdfc)
clean_files = $(tex_files:.tex=.does_not_exist)
.PHONY : FORCE_MAKE
%.does_not_exist: %.tex
latexmk --pdf -cd -c -pdflatex="lualatex -8bit %O %S" $<
%.pdf: %.tex FORCE_MAKE
# latexmk -lualatex -cd --silent --shell-escape -pdflatex="lualatex -8bit %O %S" $<
latexmk --pdf -cd --shell-escape -pdflatex="lualatex -8bit %O %S" $<
# latexmk -lualatex -cd -c -pdflatex="lualatex -8bit %O %S" $<
all: $(pdf_files)
%.pdfc: %.tex
latexmk --pdf -cd --interaction=nonstopmode -pvc --shell-escape -pdflatex="lualatex -8bit %O %S" $<
continuous: $(pdf_files_continous)
.PHONY: clean clobber
clean: $(clean_files)
find . -mindepth 2 -maxdepth 2 -name '*.pdf' -delete
clobber: $(clean_files)