diff mbox series

[V9,1/4] kbuild: Simplify builds with CONFIG_OF_ALL_DTBS

Message ID 8e500ee41a7c3aac31920fbc5183d9f6e5a83260.1614745266.git.viresh.kumar@linaro.org (mailing list archive)
State New, archived
Headers show
Series dt: Add fdtoverlay rule and statically build unittest | expand

Commit Message

Viresh Kumar March 3, 2021, 4:36 a.m. UTC
We update 'extra-y' based on CONFIG_OF_ALL_DTBS three times. It would be
far more straight forward if we rather update dtb-y to include all .dtb
files if CONFIG_OF_ALL_DTBS is enabled.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 scripts/Makefile.lib | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Masahiro Yamada March 5, 2021, 4:46 p.m. UTC | #1
On Wed, Mar 3, 2021 at 1:36 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> We update 'extra-y' based on CONFIG_OF_ALL_DTBS three times. It would be
> far more straight forward if we rather update dtb-y to include all .dtb
> files if CONFIG_OF_ALL_DTBS is enabled.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Masahiro Yamada <masahiroy@kernel.org>


> ---
>  scripts/Makefile.lib | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index eee59184de64..a2658242d956 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -73,14 +73,13 @@ always-y += $(userprogs-always-y) $(userprogs-always-m)
>
>  # DTB
>  # If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built
> +dtb-$(CONFIG_OF_ALL_DTBS)       += $(dtb-)
> +
>  always-y                       += $(dtb-y)
> -always-$(CONFIG_OF_ALL_DTBS)   += $(dtb-)
>
>  ifneq ($(CHECK_DTBS),)
>  always-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y))
>  always-y += $(patsubst %.dtbo,%.dt.yaml, $(dtb-y))
> -always-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-))
> -always-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtbo,%.dt.yaml, $(dtb-))
>  endif
>
>  # Add subdir path
> --
> 2.25.0.rc1.19.g042ed3e048af
>
diff mbox series

Patch

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index eee59184de64..a2658242d956 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -73,14 +73,13 @@  always-y += $(userprogs-always-y) $(userprogs-always-m)
 
 # DTB
 # If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built
+dtb-$(CONFIG_OF_ALL_DTBS)       += $(dtb-)
+
 always-y			+= $(dtb-y)
-always-$(CONFIG_OF_ALL_DTBS)	+= $(dtb-)
 
 ifneq ($(CHECK_DTBS),)
 always-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y))
 always-y += $(patsubst %.dtbo,%.dt.yaml, $(dtb-y))
-always-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-))
-always-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtbo,%.dt.yaml, $(dtb-))
 endif
 
 # Add subdir path