-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (35 loc) · 1.02 KB
/
Makefile
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
39
40
41
42
43
44
45
46
###
# Inspired by: https://stackoverflow.com/a/18137056/5801152
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(dir $(mkfile_path))
###
EMERALD_PATH := $(current_dir)../old-emerald/
scripts_path := $(current_dir)scripts/
common_path := $(current_dir)envs/common/
path_base := $(common_path):$(scripts_path):$(PATH)
all: vim listings
templated: \
template.sh
mkdir -p build
$(current_dir)scripts/git-ready-to-deploy.sh
EMERALD_PATH="$(EMERALD_PATH)" \
PATH="$(current_dir)envs/$(path_name)/:$(path_base)" \
bash $< > build/$(target)
clean:
rm -rf build
vim: vim-defs templated
vim-defs:
$(eval path_name := vim)
$(eval target := emerald.vim)
listings: listings-defs templated
listings-defs:
$(eval path_name := listings)
$(eval target := listings-emerald.tex)
atom-grammar: atom-grammar-defs templated
atom-grammar-defs:
$(eval path_name := atom-grammar)
$(eval target := emerald.cson)
.PHONY: all templated clean \
listings listings-defs \
vim vim-defs \
atom-grammar atom-grammar-defs