-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (47 loc) · 1.21 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# SPDX-License-Identifier: CC0-1.0
# ensure `lein` is installled
# sudo apt install leiningen
# https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
# $@ : target label
# $< : the first prerequisite after the colon
# $^ : all of the prerequisite files
SHELL := bash
BROWSER ?= firefox
.PHONY: default
default: all
choices/project.clj:
git submodule update --init --recursive
ls -l $@
@echo SUCCESS $@
choices/resources/public/js/choices.js: choices/project.clj config.yml
cp -v config.yml choices/config.yml
cd choices && lein fig:min
ls -l $@
@echo SUCCESS $@
choices/resources/public/index.html: choices/resources/public/js/choices.js
ls -l $@
touch $@
@echo SUCCESS $@
.PHONY: all
all: choices/resources/public/index.html
@echo SUCCESS $@
.PHONY: view
view: choices/resources/public/index.html
$(BROWSER) $<
@echo SUCCESS $@
.PHONY: choices-test
choices-test: choices/project.clj
cd choices && lein test
@echo SUCCESS $@
.PHONY: check
check: choices-test
@echo SUCCESS $@
.PHONY: update-submodules
update-submodules:
git submodule update --init --recursive
@echo SUCCESS $@
.PHONY: clean
clean:
git clean -dffx
git submodule foreach --recursive git clean -dffx
@echo SUCCESS $@