-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
52 lines (37 loc) · 981 Bytes
/
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
# Makefile
PIL_MODULE_DIR ?= .modules
REPO_PREFIX ?= https://github.com/aw
## Edit below
JSON_REPO = $(REPO_PREFIX)/picolisp-json.git
JSON_DIR = $(PIL_MODULE_DIR)/picolisp-json/HEAD
JSON_REF ?= v1.1.0
## Edit above
# Unit testing
TEST_REPO = $(REPO_PREFIX)/picolisp-unit.git
TEST_DIR = $(PIL_MODULE_DIR)/picolisp-unit/HEAD
# Generic
.PHONY: all clean
all: $(JSON_DIR)
$(JSON_DIR):
mkdir -p $(JSON_DIR) && \
git clone $(JSON_REPO) $(JSON_DIR) && \
cd $(JSON_DIR) && \
git checkout $(JSON_REF) && \
$(MAKE)
$(TEST_DIR):
mkdir -p $(TEST_DIR) && \
git clone $(TEST_REPO) $(TEST_DIR)
check: all $(TEST_DIR) run-tests
run-tests:
./test.l
html:
jade -o . -P -E html ui/index.jade
javascript:
cat ui/license.coffee ui/generic.coffee ui/ui.coffee | coffee --no-header -c -s > docs/ui.js
js: javascript
minify:
head -n 8 docs/ui.js > docs/ui.min.js
minify docs/ui.js >> docs/ui.min.js
ui: html javascript minify
clean:
rm -rf $(JSON_DIR) $(TEST_DIR)