Skip to content

Commit

Permalink
Consistently generate build tags on newer Make (#2018)
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]>
  • Loading branch information
3 people authored Feb 20, 2023
1 parent e99ce3e commit 297cdb9
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 297cdb9

Please sign in to comment.