Skip to content

Commit

Permalink
makefile: check and alert if GOPATH is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
safchain committed Jun 3, 2020
1 parent 45fd205 commit 0315951
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .mk/check.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

.PHONY: gopath
gopath:

ifndef GOPATH
$(error GOPATH is undefined, Skydive requires to have GOPATH defined to build)
endif

.PHONY: fmt
fmt: genlocalfiles
@echo "+ $@"
Expand Down
4 changes: 2 additions & 2 deletions .mk/debug.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ ifeq (${DEBUG}, true)
export DEBUG
endif

.PHONY: debug.agent
.PHONY: run.agent
run.agent:
$(call skydive_run,agent)

.PHONY: debug.analyzer
.PHONY: run.analyzer
run.analyzer:
$(call skydive_run,analyzer)
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ ifeq ($(WITH_PACKETINJECT), true)
BUILD_TAGS+=packetinject
endif


include .mk/ebpf.mk
include .mk/api.mk
include .mk/bench.mk
Expand Down Expand Up @@ -140,14 +141,14 @@ endef
$(call GOCOMPILE,build)

.PHONY: build
build: moddownload genlocalfiles .build
build: gopath moddownload genlocalfiles .build

.PHONY: .install
.install:
$(call GOCOMPILE,install)

.PHONY: skydive
skydive: moddownload genlocalfiles .install
skydive: gopath moddownload genlocalfiles .install

.PHONY: skydive.clean
skydive.clean:
Expand Down

0 comments on commit 0315951

Please sign in to comment.