summaryrefslogtreecommitdiffstats
path: root/makefile
blob: 1d7909992647747cc1d6ee39d3f0371217f43f7a (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
# file settings
BUILD_DIR 	:= build
DRAFT		:= lfc_draft.pdf
FINAL		:= lfc_final.pdf

# tex settings
TEX := pdflatex \
		-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
all: $(_DRAFT)

$(_DRAFT): $(_DRAFT_SRC) build_dir
	$(TEX) $<

$(_FINAL): $(_FINAL_SRC) build_dir
	$(TEX) $<

build_dir:
	mkdir -p $(BUILD_DIR)