From c9702212996378d58ccddd01983db78aefcedd4b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 14 Apr 2026 21:43:38 +0200 Subject: [PATCH] build: fix malformed definition of newline The definition of a newline withe name '\n' was invalid and broke introduced commands-before-first-target syntax errors in the Makefile. This change fixes the poblem by changing the name to the valid name NEWLINE. Signed-off-by: Michael Adam Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- build/makelib/common.mk | 3 +-- build/makelib/golang.mk | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build/makelib/common.mk b/build/makelib/common.mk index 2519103ef..7b8be4cda 100644 --- a/build/makelib/common.mk +++ b/build/makelib/common.mk @@ -131,7 +131,6 @@ SPACE := SPACE += # define a newline -define \n - +define NEWLINE endef diff --git a/build/makelib/golang.mk b/build/makelib/golang.mk index 8337870b3..1f306f3e4 100644 --- a/build/makelib/golang.mk +++ b/build/makelib/golang.mk @@ -127,13 +127,13 @@ go.init: go.build: @echo === go build $(PLATFORM) $(info Go version: $(shell $(GO) version)) - $(foreach p,$(GO_STATIC_PACKAGES),@CGO_ENABLED=$(CGO_ENABLED_VALUE) $(GO) build -v -o $(GO_OUT_DIR)/$(lastword $(subst /, ,$(p)))$(GO_OUT_EXT) $(GO_STATIC_FLAGS) $(p)${\n}) - $(foreach p,$(GO_TEST_PACKAGES),@CGO_ENABLED=$(CGO_ENABLED_VALUE) $(GO) test -v -c -o $(GO_TEST_OUTPUT)/$(lastword $(subst /, ,$(p)))$(GO_OUT_EXT) $(GO_STATIC_FLAGS) $(p)${\n}) + $(foreach p,$(GO_STATIC_PACKAGES),@CGO_ENABLED=$(CGO_ENABLED_VALUE) $(GO) build -v -o $(GO_OUT_DIR)/$(lastword $(subst /, ,$(p)))$(GO_OUT_EXT) $(GO_STATIC_FLAGS) $(p)$(NEWLINE)) + $(foreach p,$(GO_TEST_PACKAGES),@CGO_ENABLED=$(CGO_ENABLED_VALUE) $(GO) test -v -c -o $(GO_TEST_OUTPUT)/$(lastword $(subst /, ,$(p)))$(GO_OUT_EXT) $(GO_STATIC_FLAGS) $(p)$(NEWLINE)) .PHONY: go.install go.install: @echo === go install $(PLATFORM) - $(foreach p,$(GO_STATIC_PACKAGES),@CGO_ENABLED=$(CGO_ENABLED_VALUE) $(GO) install -v $(GO_STATIC_FLAGS) $(p)${\n}) + $(foreach p,$(GO_STATIC_PACKAGES),@CGO_ENABLED=$(CGO_ENABLED_VALUE) $(GO) install -v $(GO_STATIC_FLAGS) $(p)$(NEWLINE)) # GOJUNIT need to happen in order and NOT in parallel, so call them explicitly .PHONY: go.test.unit