]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: sort hostprogs before passing it to ifneq
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 29 Jul 2020 03:15:37 +0000 (12:15 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 9 Aug 2020 16:32:59 +0000 (01:32 +0900)
commit9baab4d141f3b922d680baed8236645d657bc87d
tree15329f252c14115c08d7afd9857098eb01aed0cd
parent09e8f143336c88c1ae5a58976e0123f42f45bd23
kbuild: sort hostprogs before passing it to ifneq

The conditional:

  ifneq ($(hostprogs),)

... is evaluated to true if $(hostprogs) does not contain any word but
whitespace characters.

  ifneq ($(strip $(hostprogs)),)

... is a safe way to avoid interpreting whitespace as a non-empty value,
but I'd rather want to use the side-effect of $(sort ...) to do the
equivalent.

$(sort ...) is used in scripts/Makefile.host in order to drop duplication
in $(hostprogs). It is also useful to strip excessive spaces.

Move $(sort ...) before evaluating the ifneq.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/Makefile.build
scripts/Makefile.host