forked from mitchellh/go-mruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (24 loc) · 626 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
MRUBY_COMMIT ?= 1.2.0
all: libmruby.a test
clean:
rm -rf vendor
rm -f libmruby.a
gofmt:
@echo "Checking code with gofmt.."
gofmt -s *.go >/dev/null
lint:
sh golint.sh
megacheck:
go get honnef.co/go/tools/cmd/megacheck
GO111MODULE=off megacheck ./...
libmruby.a: vendor/mruby
cd vendor/mruby && ${MAKE}
cp vendor/mruby/build/host/lib/libmruby.a .
vendor/mruby:
mkdir -p vendor
git clone https://github.com/mruby/mruby.git vendor/mruby
cd vendor/mruby && git reset --hard && git clean -fdx
cd vendor/mruby && git checkout ${MRUBY_COMMIT}
test: gofmt lint
go test -v
.PHONY: all clean libmruby.a test lint