mk: restore compatibility to Make 4.1

The leading newline in the _capture function confused _filecontent,
which resulted in empty port hashes.

Fixes regression introduced in 437fd21ba0
(issue #4725).
This commit is contained in:
Christian Helmuth 2023-01-30 09:55:04 +01:00
parent 9dbaa150d6
commit e17d104c0a

View File

@ -13,11 +13,11 @@ _assert = $(if $1,$1,$(error Error: $2))
#
# We must not specify an '=' here. Even though the make documentation states
# that the omission of '=' should be equivalent to '=', the behaviour is not
# the same.
# the same. Note, the result of the 'eval' function is always the empty string
# and, thus, it can be placed virtually anywhere in a makefile.
#
define _capture
$(eval $2 += $1)
$1
$(eval $2 += $1)$1
endef
#