Skip to content

Commit

Permalink
pillar: move ldflags from commandline to a variable
Browse files Browse the repository at this point in the history
Just refactoring to improve readability, and to help calculate flags
for different flavours in latter patches

Signed-off-by: Yuri Volchkov <yuri@volch.org>
  • Loading branch information
Yuri Volchkov authored and eriknordmark committed Jun 23, 2022
1 parent 477aeee commit 8bb32ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/pillar/Makefile
Expand Up @@ -32,10 +32,14 @@ $(DISTDIR):

build: $(APPS) $(APPS1)


LDFLAGS=-s -w -X=main.Version=$(BUILD_VERSION)
LDFLAGS:=-ldflags "$(LDFLAGS)"

$(APPS): $(DISTDIR)/$(APPS)
$(DISTDIR)/$(APPS): $(DISTDIR)
@echo "Building $@"
GO111MODULE=on GOOS=linux go build -mod=vendor -ldflags "-s -w -X=main.Version=$(BUILD_VERSION)" -o $@ ./$(@F)
GO111MODULE=on GOOS=linux go build -mod=vendor $(LDFLAGS) -o $@ ./$(@F)

$(APPS1): $(DISTDIR)
@echo $@
Expand Down

0 comments on commit 8bb32ec

Please sign in to comment.