summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 1671523..1266971 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,8 @@
TEX := $(wildcard *.tex)
NAMES := $(TEX:.tex=.pdf)
+TEX2PDF := xelatex
+TEXFLAGS :=
+TEMPSUFFIX := tex
# Target that matches all possible generated PDFs
all: $(NAMES)
@@ -7,19 +10,19 @@ $(NAMES): $(%:.pdf=.tex)
# Rule that builds the tex file in a temp directory and copies it
%.pdf: %.tex
- $(eval TMP := $(shell mktemp -d --suffix=-sts-build))
+ $(eval TMP := $(shell mktemp -d --suffix=$(TEMPSUFFIX)))
@cp -r * $(TMP)/
cd $(TMP)/; \
- xelatex $<;
+ $(TEX2PDF) $(TEXFLAGS) $<;
@cp $(TMP)/$@ $@
- @rm -rf $(TMP)
+ @$(RM) -r $(TMP)
# Rule that cleans all previous content
clean:
- @rm *.pdf
- @rm -r /tmp/*-sts-build
+ @$(RM) *.pdf
+ @$(RM) -r /tmp/*$(TEMPSUFFIX)
watch: watch.sh
./watch.sh
-.PHONY: all clean watch \ No newline at end of file
+.PHONY: all clean watch