This repository has been archived on 2023-08-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2017-09-22 09:44:56 -04:00
|
|
|
GOROOT ?= $(shell go env GOROOT)
|
2017-09-12 13:08:26 -04:00
|
|
|
GO ?= $(GOROOT)/bin/go
|
2017-04-03 10:00:38 -04:00
|
|
|
REPO=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
2017-09-12 13:08:26 -04:00
|
|
|
VERSION=$(shell $(GO) version | cut -d' ' -f3)
|
2016-12-14 17:45:44 -05:00
|
|
|
|
2017-09-12 13:08:26 -04:00
|
|
|
all: build
|
2016-12-14 17:45:44 -05:00
|
|
|
|
2017-09-12 13:08:26 -04:00
|
|
|
build: srndv2
|
|
|
|
|
|
|
|
|
|
assert-go:
|
|
|
|
|
test $(VERSION) = go1.9
|
|
|
|
|
|
|
|
|
|
srndv2: assert-go
|
2017-09-24 08:10:35 -04:00
|
|
|
GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) build -ldflags "-X srnd.GitVersion=-$(shell git rev-parse --short HEAD)" -v
|
2016-12-14 17:45:44 -05:00
|
|
|
|
|
|
|
|
clean:
|
2017-09-12 13:08:26 -04:00
|
|
|
GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) clean -v
|
2017-08-26 10:41:28 -04:00
|
|
|
|
|
|
|
|
test:
|
2017-09-12 13:08:26 -04:00
|
|
|
GOPATH=$(REPO) GOROOT=$(GOROOT) $(GO) test -v srnd
|