-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (32 loc) · 812 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
APP= autocomplete
SRC= src/app.go \
src/config.go \
src/utils.go \
src/redis.go \
src/router.go \
src/middleware.go \
src/models.go \
src/index.go \
src/search.go \
src/get_object.go
PKG= github.com/garyburd/redigo/redis \
github.com/ant0ine/go-json-rest/rest \
github.com/fatih/structs
GOPATH := ${PWD}/pkg:${GOPATH}
export GOPATH
default:build
build:
go build -v -o ./bin/$(APP) $(SRC)
fmt:
go fmt $(SRC)
run: build
./bin/$(APP)
vendor_clean:
rm -dRf ./pkg/*
vendor_get:
GOPATH=${PWD}/pkg go get -d -u -v $(PKG)
vendor_update: vendor_get
rm -rf `find ./pkg/src -type d -name .git` \
&& rm -rf `find ./pkg/src -type d -name .hg` \
&& rm -rf `find ./pkg/src -type d -name .bzr` \
&& rm -rf `find ./pkg/src -type d -name .svn`