From e17d104c0a6f570e60237333ab5441bf5ca57bba Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 30 Jan 2023 09:55:04 +0100 Subject: [PATCH] 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 437fd21ba00e3407c984d5602b766a3c73caa6d5 (issue #4725). --- repos/base/mk/util.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/base/mk/util.inc b/repos/base/mk/util.inc index c99de8da5c..817f60bac5 100644 --- a/repos/base/mk/util.inc +++ b/repos/base/mk/util.inc @@ -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 #