@cryptotaxi247 / kubo / commits / bf23a81bb

make: fix `make install` not using ldflags for git hash

License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

Jakub Sztandera committed Mar 27, 2017 at 15:19 UTC bf23a81bb3176d0ca909919f173bef4af91b0831
2 files changed +10 -3
Rules.mk
+1 -2
@@ -99,8 +99,7 @@ nofuse: GOTAGS += nofuse
99 nofuse: build
100 .PHONY: nofuse
101
102 -install: $$(DEPS_GO)
103 - go install $(go-flags-with-tags) ./cmd/ipfs
102 +install: cmd/ipfs-install
103 .PHONY: install
104
105 install_unsupported:
cmd/ipfs/Rules.mk
+9 -1
@@ -12,12 +12,20 @@ PATH := $(realpath $(d)):$(PATH)
12 # DEPS_OO_$(d) += merkledag/pb/merkledag.pb.go namesys/pb/namesys.pb.go
13 # DEPS_OO_$(d) += pin/internal/pb/header.pb.go unixfs/pb/unixfs.pb.go
14
15 -$(IPFS_BIN_$(d)): GOFLAGS += -ldflags="-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=$(shell git rev-parse --short HEAD)"
15 +$(d)_flags =-ldflags="-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=$(shell git rev-parse --short HEAD)"
16 +
17 +$(IPFS_BIN_$(d)): GOFLAGS += $(cmd/ipfs_flags)
18
19 # uses second expansion to collect all $(DEPS_GO)
20 $(IPFS_BIN_$(d)): $(d) $$(DEPS_GO) ALWAYS #| $(DEPS_OO_$(d))
21 $(go-build)
22
23 +
24 +$(d)-install: GOFLAGS += $(cmd/ipfs_flags)
25 +$(d)-install:
26 + go install $(go-flags-with-tags) ./cmd/ipfs
27 +.PHONY: $(d)-install
28 +
29 COVER_BIN_$(d) := $(d)/ipfs-test-cover
30 CLEAN += $(COVER_BIN_$(d))
31