forked from mvaltas/checklists
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 648 Bytes
/
Makefile
File metadata and controls
34 lines (27 loc) · 648 Bytes
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
# Set
SOURCE_DIR := source
BUILD_DIR := build
OUTPUT_DIR := pdf
SOURCES := $(wildcard $(SOURCE_DIR)/*.tex)
all: prepare_directories compile publish cleanup
prepare_directories:
mkdir -p $(BUILD_DIR)
mkdir -p $(OUTPUT_DIR)
compile: $(SOURCES)
@set -ex; \
for i in $(SOURCES); do \
echo "Building $$i from source"; \
xelatex -output-dir=$(BUILD_DIR) "$$i"; \
xelatex -output-dir=$(BUILD_DIR) "$$i"; \
xelatex -output-dir=$(BUILD_DIR) "$$i"; \
done
publish:
mv $(BUILD_DIR)/*.pdf $(OUTPUT_DIR)
cleanup:
@echo Removing $(BUILD_DIR)
rm -rf $(BUILD_DIR)
list_sources:
@set -ex; \
for i in $(SOURCES); do \
echo "$$i"; \
done