Merge pull request #1015 from ipfs/fix/1012-Makefile-trim
Fix #1012: Trim paths on Makefile builds
This commit is contained in:
commit
9ad268162b
|
@ -1,15 +1,17 @@
|
||||||
# go source files
|
# go source files
|
||||||
SRC := $(shell find .. -type f -name '*.go')
|
SRC := $(shell find ../.. -type f -name '*.go')
|
||||||
|
GOPATH := $(shell go env GOPATH)
|
||||||
|
GOFLAGS := "-asmflags=all='-trimpath=$(GOPATH)'" "-gcflags=all='-trimpath=$(GOPATH)'"
|
||||||
|
|
||||||
all: ipfs-cluster-ctl
|
all: ipfs-cluster-ctl
|
||||||
|
|
||||||
ipfs-cluster-ctl: $(SRC)
|
ipfs-cluster-ctl: $(SRC)
|
||||||
go build -mod=readonly
|
go build $(GOFLAGS) -mod=readonly
|
||||||
|
|
||||||
build: ipfs-cluster-ctl
|
build: ipfs-cluster-ctl
|
||||||
|
|
||||||
install:
|
install:
|
||||||
go install
|
go install $(GOFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ipfs-cluster-ctl
|
rm -f ipfs-cluster-ctl
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
# go source files
|
# go source files
|
||||||
SRC := $(shell find .. -type f -name '*.go')
|
SRC := $(shell find ../.. -type f -name '*.go')
|
||||||
|
GOPATH := $(shell go env GOPATH)
|
||||||
|
GOFLAGS := "-asmflags=all='-trimpath=$(GOPATH)'" "-gcflags=all='-trimpath=$(GOPATH)'"
|
||||||
|
|
||||||
all: ipfs-cluster-follow
|
all: ipfs-cluster-follow
|
||||||
|
|
||||||
ipfs-cluster-follow: $(SRC)
|
ipfs-cluster-follow: $(SRC)
|
||||||
go build -mod=readonly -ldflags "-X main.commit=$(shell git rev-parse HEAD)"
|
go build $(GOFLAGS) -mod=readonly -ldflags "-X main.commit=$(shell git rev-parse HEAD)"
|
||||||
|
|
||||||
build: ipfs-cluster-follow
|
build: ipfs-cluster-follow
|
||||||
|
|
||||||
install:
|
install:
|
||||||
go install -ldflags "-X main.commit=$(shell git rev-parse HEAD)"
|
go install $(GOFLAGS) -ldflags "-X main.commit=$(shell git rev-parse HEAD)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ipfs-cluster-follow
|
rm -f ipfs-cluster-follow
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
# go source files
|
# go source files
|
||||||
SRC := $(shell find .. -type f -name '*.go')
|
SRC := $(shell find ../.. -type f -name '*.go')
|
||||||
|
GOPATH := $(shell go env GOPATH)
|
||||||
|
GOFLAGS := "-asmflags=all='-trimpath=$(GOPATH)'" "-gcflags=all='-trimpath=$(GOPATH)'"
|
||||||
|
|
||||||
all: ipfs-cluster-service
|
all: ipfs-cluster-service
|
||||||
|
|
||||||
ipfs-cluster-service: $(SRC)
|
ipfs-cluster-service: $(SRC)
|
||||||
go build -mod=readonly -ldflags "-X main.commit=$(shell git rev-parse HEAD)"
|
go build $(GOFLAGS) -mod=readonly -ldflags "-X main.commit=$(shell git rev-parse HEAD)"
|
||||||
|
|
||||||
build: ipfs-cluster-service
|
build: ipfs-cluster-service
|
||||||
|
|
||||||
install:
|
install:
|
||||||
go install -ldflags "-X main.commit=$(shell git rev-parse HEAD)"
|
go install $(GOFLAGS) -ldflags "-X main.commit=$(shell git rev-parse HEAD)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ipfs-cluster-service
|
rm -f ipfs-cluster-service
|
||||||
|
|
Loading…
Reference in New Issue
Block a user