-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (33 loc) · 1.13 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
BASIC=Makefile
GO=go
GIT=git
$(eval VERSION:=$(shell git rev-parse HEAD)$(shell git diff --quiet || echo '*'))
$(eval REMOTE:=$(shell git remote get-url origin))
LD_FLAGS=-ldflags "-X main.Version=${VERSION} -X main.Remote=${REMOTE}"
all: .PHONY NCBI2wikidata GenerateMeshTerms
NCBI2wikidata: .PHONY check-env
$(GO) install $(LD_FLAGS) github.com/ContentMine/NCBI2wikidata
GenerateMeshTerms: .PHONY check-env
$(GO) install $(LD_FLAGS) github.com/ContentMine/GenerateMeshTerms
fmt: .PHONY check-env
$(GO) fmt github.com/ContentMine/NCBI2wikidata
$(GO) fmt github.com/ContentMine/GenerateMeshTerms
$(GO) fmt github.com/ContentMine/EUtils
vet: .PHONY check-env
$(GO) vet github.com/ContentMine/NCBI2wikidata
$(GO) vet github.com/ContentMine/GenerateMeshTerms
$(GO) vet github.com/ContentMine/EUtils
test: .PHONY vet check-env
$(GO) test -v github.com/ContentMine/NCBI2wikidata
$(GO) test -v github.com/ContentMine/GenerateMeshTerms
$(GO) test -v github.com/ContentMine/EUtils
get: .PHONY
$(GIT) submodule update --init
clean: .PHONY
rm -r bin
rm -r pkg
.PHONY:
check-env: .PHONY
ifndef GOPATH
$(error GOPATH is undefined)
endif