Skip to content

Commit

Permalink
Consistently generate build tags on newer Make (#2018) (#2225)
Browse files Browse the repository at this point in the history
With Make 4.3+, the empty whitespace does not seem to work as
originally intended. This causes build tags to be "netgo ledger,"
on Ubuntu 22.04 and other systems that include the newer Make
version. The build tags were intended as "netgo,ledger" which
can be observed on Make 4.2 (shipped with Ubuntu 20.04).

This change swaps out the `+=` use in favor of an explicit `:=`.
Ref: https://www.gnu.org/software/make/manual/html_node/Appending.html

Closes #2017.

Co-authored-by: Marius Poke <[email protected]>
Co-authored-by: Milan Mulji <[email protected]>
(cherry picked from commit 297cdb9)

Co-authored-by: Valters Jansons <[email protected]>
  • Loading branch information
mergify[bot] and sigv authored Feb 20, 2023
1 parent 890ab3a commit 8312b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ build_tags += $(BUILD_TAGS)
build_tags := $(strip $(build_tags))

whitespace :=
whitespace += $(whitespace)
whitespace := $(whitespace) $(whitespace)
comma := ,
build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))

Expand Down

0 comments on commit 8312b13

Please sign in to comment.