[PATCH] build: correct usage comments in Kbuild.include

Jan Beulich posted 1 patch 2 years, 3 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/602c9632-9981-1b66-172b-4aed396e8508@suse.com
[PATCH] build: correct usage comments in Kbuild.include
Posted by Jan Beulich 2 years, 3 months ago
Macros with arguments need to be invoked via $(call ...); don't misguide
people looking up usage of such macros.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/scripts/Kbuild.include
+++ b/xen/scripts/Kbuild.include
@@ -43,15 +43,15 @@ define as-option-add-closure
     endif
 endef
 
-# $(if-success,<command>,<then>,<else>)
+# $(call if-success,<command>,<then>,<else>)
 # Return <then> if <command> exits with 0, <else> otherwise.
 if-success = $(shell { $(1); } >/dev/null 2>&1 && echo "$(2)" || echo "$(3)")
 
-# $(success,<command>)
+# $(call success,<command>)
 # Return y if <command> exits with 0, n otherwise
 success = $(call if-success,$(1),y,n)
 
-# $(ld-option,<flag>)
+# $(call ld-option,<flag>)
 # Return y if the linker supports <flag>, n otherwise
 ld-option = $(call success,$(LD) -v $(1))
 


Re: [PATCH] build: correct usage comments in Kbuild.include
Posted by Andrew Cooper 2 years, 3 months ago
On 12/01/2022 11:28, Jan Beulich wrote:
> Macros with arguments need to be invoked via $(call ...); don't misguide
> people looking up usage of such macros.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>