-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
38 lines (30 loc) · 887 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
SHELL := /bin/bash
rocksDir=.rocks
ifeq ($(env), travis)
root=/home/travis/build/chrisdugne/cherry
else
root=.
endif
ifeq ($(verbose), true)
export DEBUG := true
endif
# CI does not use this install, this is for local purpose
install: clean hererocks rocks test
hererocks:
hererocks ${rocksDir} -r^ --lua=5.1
. ${rocksDir}/bin/activate
rocks:
@${rocksDir}/bin/luarocks install --tree ${rocksDir} dkjson
@${rocksDir}/bin/luarocks install --tree ${rocksDir} luacov
@${rocksDir}/bin/luarocks install --tree ${rocksDir} luacheck
@${rocksDir}/bin/luarocks install --tree ${rocksDir} busted
@${rocksDir}/bin/luarocks install --tree ${rocksDir} luasocket
luacheck:
@${rocksDir}/bin/luacheck .
busted:
@${rocksDir}/bin/busted -v --run=tests --config-file=test/.busted \
-m '${root}/test/?.lua;'
test: luacheck busted
clean:
@rm -rf ${rocksDir}
@echo removed ${rocksDir}