Skip to content

Commit

Permalink
[BUILD] Use $(PKGNAME) variable to simplify Makefile
Browse files Browse the repository at this point in the history
Change-Id: I78b5246b8e914f536fc8997fd2a9a081a50b1aa1
Signed-off-by: Greg Haskins <gregory.haskins@gmail.com>
  • Loading branch information
ghaskins committed Nov 7, 2016
1 parent 48a117a commit 37f44d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ PROJECT_VERSION=$(BASE_VERSION)
endif

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

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

build/bin:
Expand Down

0 comments on commit 37f44d3

Please sign in to comment.