forked from linuxdeepin/go-gir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (21 loc) · 783 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
PREFIX = /usr
GOPATH_DIR = gopath
GOPKG_PREFIX = github.com/linuxdeepin/go-gir
export GO111MODULE=off
# FIXME: not working! export GOPATH= $(shell go env GOPATH)
export GOPATH = /usr/share/gocode
all: build
build: test
generate:
go generate ./...
prepare:
@mkdir -p ${GOPATH_DIR}/src/$(dir ${GOPKG_PREFIX});
@ln -snf ../../../.. ${GOPATH_DIR}/src/${GOPKG_PREFIX};
test: clean prepare
env GOPATH="${CURDIR}/${GOPATH_DIR}:${GOPATH}" go test ./... -coverpkg=${GOPATH_DIR}
install: clean
@mkdir -p ${DESTDIR}${PREFIX}/share/gocode/src/github.com/linuxdeepin/go-gir/;
`ls -1 | grep -v 'debian' | grep -v 'archlinux' | grep -v 'rpm' | xargs -I {} cp -r {} ${DESTDIR}${PREFIX}/share/gocode/src/github.com/linuxdeepin/go-gir/`
clean:
rm -rf ${GOPATH_DIR}
.PHONY: test