summaryrefslogtreecommitdiffstats
path: root/makefile
blob: 081d17bc834b59de992ef379d6166a5ac200c66b (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
# file settings
BUILD_DIR 	:= build
DOC  		:= lfc_draft.pdf

# tex settings
TEX := xelatex \
		-interaction=nonstopmode \
		-halt-on-error \
		-output-directory=$(BUILD_DIR)

# automated stuff
_DOC := $(BUILD_DIR)/$(DOC)
_DOC_SRC := $(patsubst %.pdf,%.tex,$(DOC))

# recipes
.PHONY: build_dir count
all: $(DOC) count

$(DOC): $(_DOC_SRC) build_dir
	$(TEX) $<

count: $(_DOC_SRC)
	texcount -letter $< | tee count.txt
	texcount $< | tee -a count.txt


build_dir:
	mkdir -p $(BUILD_DIR)