Skip to content

Commit 37f44d3

Browse files
committed
[BUILD] Use $(PKGNAME) variable to simplify Makefile
Change-Id: I78b5246b8e914f536fc8997fd2a9a081a50b1aa1 Signed-off-by: Greg Haskins <[email protected]>
1 parent 48a117a commit 37f44d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ PROJECT_VERSION=$(BASE_VERSION)
4646
endif
4747

4848
PKGNAME = github.com/$(PROJECT_NAME)
49-
GO_LDFLAGS = -X github.com/hyperledger/fabric/metadata.Version=$(PROJECT_VERSION)
49+
GO_LDFLAGS = -X $(PKGNAME)/metadata.Version=$(PROJECT_VERSION)
5050
CGO_FLAGS = CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy"
5151
UID = $(shell id -u)
5252
ARCH=$(shell uname -m)
@@ -64,7 +64,7 @@ K := $(foreach exec,$(EXECUTABLES),\
6464
SUBDIRS = gotools
6565
SUBDIRS:=$(strip $(SUBDIRS))
6666

67-
GOSHIM_DEPS = $(shell ./scripts/goListFiles.sh github.com/hyperledger/fabric/core/chaincode/shim | sort | uniq)
67+
GOSHIM_DEPS = $(shell ./scripts/goListFiles.sh $(PKGNAME)/core/chaincode/shim | sort | uniq)
6868
JAVASHIM_DEPS = $(shell git ls-files core/chaincode/shim/java)
6969
PROJECT_FILES = $(shell git ls-files)
7070
IMAGES = src ccenv peer javaenv orderer
@@ -152,7 +152,7 @@ build/docker/bin/%: build/image/src/.dummy $(PROJECT_FILES)
152152
--user=$(UID) \
153153
-v $(abspath build/docker/bin):/opt/gopath/bin \
154154
-v $(abspath build/docker/pkg):/opt/gopath/pkg \
155-
hyperledger/fabric-src:$(DOCKER_TAG) go install -ldflags "$(GO_LDFLAGS)" github.com/hyperledger/fabric/$(TARGET)
155+
hyperledger/fabric-src:$(DOCKER_TAG) go install -ldflags "$(GO_LDFLAGS)" $(PKGNAME)/$(TARGET)
156156
@touch $@
157157

158158
build/bin:

0 commit comments

Comments
 (0)