Trying a different approach

This commit is contained in:
Carl Tashian 2023-06-21 14:34:29 -07:00
parent de52aee9b1
commit b2b8b48949
No known key found for this signature in database

View file

@ -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