Skip to content

Commit 2b802c4

Browse files
committed
Makefile: adjust documentation for variable extensions
1 parent 18ddcb2 commit 2b802c4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ install-reuse: FORCE
5050

5151
prepare-static-check: FORCE install-golangci-lint install-modernize install-shellcheck install-go-licence-detector install-addlicense install-reuse
5252

53-
# To add additional flags or values, specify the variable in the environment, e.g. `GO_BUILDFLAGS='-tags experimental' make`.
53+
# To add additional flags or values (before the default ones), specify the variable in the environment, e.g. `GO_BUILDFLAGS='-tags experimental' make`.
5454
# To override the default flags or values, specify the variable on the command line, e.g. `make GO_BUILDFLAGS='-tags experimental'`.
5555
GO_BUILDFLAGS += -mod vendor
5656
GO_LDFLAGS +=

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ When invoking the respective targets utilizing the variables, it's possible to e
459459

460460
```console
461461
$ GO_BUILDFLAGS="-work -v" make build/go-makefile-maker
462-
env go build -mod vendor -work -v -ldflags ...
462+
env go build -work -v -mod vendor -ldflags ...
463463
```
464464

465465
or to override their values by passing the variables as `make` arguments:

internal/makefile/makefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ endif
214214
if isGolang {
215215
// WARNING: DO NOT CHANGE THIS WITHOUT FIRST UNDERSTANDING THE CONSEQUENCES.
216216
// All changes have to be okay'd by Stefan Majewsky to avoid breaking setups.
217-
build.addDefinition("# To add additional flags or values, specify the variable in the environment, e.g. `GO_BUILDFLAGS='-tags experimental' make`.")
217+
build.addDefinition("# To add additional flags or values (before the default ones), specify the variable in the environment, e.g. `GO_BUILDFLAGS='-tags experimental' make`.")
218218
build.addDefinition("# To override the default flags or values, specify the variable on the command line, e.g. `make GO_BUILDFLAGS='-tags experimental'`.")
219219
build.addDefinition("GO_BUILDFLAGS +=%s", cfg.Variable("GO_BUILDFLAGS", defaultBuildFlags))
220220
build.addDefinition("GO_LDFLAGS +=%s", cfg.Variable("GO_LDFLAGS", strings.TrimSpace(defaultLdFlags)))

0 commit comments

Comments
 (0)