-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (25 loc) · 754 Bytes
/
Makefile
File metadata and controls
35 lines (25 loc) · 754 Bytes
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
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 ScienceSourceIngest
ScienceSourceIngest: .PHONY check-env
$(GO) install $(LD_FLAGS) github.com/ContentMine/ScienceSourceReview
fmt: .PHONY check-env
$(GO) fmt github.com/ContentMine/ScienceSourceReview
vet: .PHONY
$(GO) vet github.com/ContentMine/ScienceSourceReview
test: .PHONY vet
$(GO) test github.com/ContentMine/ScienceSourceReview
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