-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (41 loc) · 1.15 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
DEV_ROCKS = busted luacheck
.PHONY: install dev clean doc lint test test-integration test-plugins test-all coverage
install:
@if [ `uname` = "Darwin" ]; then \
luarocks make kong-*.rockspec; \
else \
luarocks make kong-*.rockspec \
PCRE_LIBDIR=`find / -type f -name "libpcre.so*" -print -quit | xargs dirname` \
OPENSSL_LIBDIR=`find / -type f -name "libssl.so*" -print -quit | xargs dirname`; \
fi
dev: install
@for rock in $(DEV_ROCKS) ; do \
if ! command -v $$rock > /dev/null ; then \
echo $$rock not found, installing via luarocks... ; \
luarocks install $$rock ; \
else \
echo $$rock already installed, skipping ; \
fi \
done;
clean:
rm -f luacov.*
rm -rf servroot
doc:
@ldoc -c config.ld kong
lint:
@luacheck -q . \
--exclude-files 'kong/vendor/**/*.lua' \
--exclude-files 'spec/fixtures/invalid-module.lua' \
--std 'ngx_lua+busted' \
--globals '_KONG' \
--globals 'ngx' \
--no-redefined \
--no-unused-args
test:
@bin/busted -v spec/01-unit
test-integration:
@bin/busted -v spec/02-integration
test-plugins:
@bin/busted -v spec/03-plugins
test-all:
@bin/busted -v spec/