forked from TrueCloudLab/certificates
Trying a different approach
This commit is contained in:
parent
de52aee9b1
commit
b2b8b48949
1 changed files with 10 additions and 3 deletions
13
Makefile
13
Makefile
|
@ -61,8 +61,15 @@ endif
|
|||
|
||||
DATE := $(shell date -u '+%Y-%m-%d %H:%M UTC')
|
||||
LDFLAGS := -ldflags='-w -X "main.Version=$(VERSION)" -X "main.BuildTime=$(DATE)"'
|
||||
GOFLAGS ?=
|
||||
GO_ENVS := CGO_ENABLED=0
|
||||
GOFLAGS := -v
|
||||
|
||||
ifeq (,$(GOFLAGS))
|
||||
ifeq (,$(findstring CGO_ENABLED=0,$(GO_ENVS)))
|
||||
GO_ENVS := $(GO_ENVS) CGO_ENABLED=1
|
||||
endif
|
||||
else
|
||||
GO_ENVS := $(GO_ENVS) CGO_ENABLED=0
|
||||
endif
|
||||
|
||||
download:
|
||||
$Q go mod download
|
||||
|
@ -72,7 +79,7 @@ build: $(PREFIX)bin/$(BINNAME)
|
|||
|
||||
$(PREFIX)bin/$(BINNAME): download $(call rwildcard,*.go)
|
||||
$Q mkdir -p $(@D)
|
||||
$Q $(GOOS_OVERRIDE) $(GO_ENVS) go build -v -o $(PREFIX)bin/$(BINNAME) $(LDFLAGS) $(PKG)
|
||||
$Q $(GOOS_OVERRIDE) $(GO_ENVS) go build $(GOFLAGS) -o $(PREFIX)bin/$(BINNAME) $(LDFLAGS) $(PKG)
|
||||
|
||||
# Target to force a build of step-ca without running tests
|
||||
simple: build
|
||||
|
|
Loading…
Reference in a new issue