blob: 580145d0e7fc3f0ead81b3c0eef1f50ed64890f9 (
plain)
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
35
36
37
38
|
# file settings
BUILD_DIR := build
DRAFT := lfc_draft.pdf
FINAL := lfc_final.pdf
# tex settings
TEX := xelatex \
-interaction=nonstopmode \
-halt-on-error \
-output-directory=$(BUILD_DIR)
# automated stuff
_DRAFT := $(BUILD_DIR)/$(DRAFT)
_DRAFT_SRC := $(patsubst %.pdf,%.tex,$(DRAFT))
_FINAL := $(BUILD_DIR)/$(FINAL)
_FINAL_SRC := $(patsubst %.pdf,%.tex,$(FINAL))
# recipes
.PHONY: build_dir count count_draft count_final
all: $(_DRAFT)
$(_DRAFT): $(_DRAFT_SRC) build_dir
$(TEX) $<
$(_FINAL): $(_FINAL_SRC) build_dir
$(TEX) $<
count: count_draft
count_draft: $(_DRAFT_SRC)
texcount -char $<
count_final: $(_FINAL_SRC)
texcount $<
build_dir:
mkdir -p $(BUILD_DIR)
|