Later commit will add a target for building all enabled device trees. For this to work, we need to build the device tree compiler first, but there is only a scripts target, which builds many extra tools unnecessary for a mere device tree compilation. Therefore, let's split that up and add a new scripts_dtc target that can be depended on separately. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- Makefile | 6 +++++- scripts/Makefile | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5f5f830af5d2..82f90373cbbd 100644 --- a/Makefile +++ b/Makefile @@ -1032,7 +1032,7 @@ include/config/kernel.release: FORCE # Carefully list dependencies so we do not try to build scripts twice # in parallel PHONY += scripts -scripts: scripts_basic include/generated/utsrelease.h +scripts: scripts_basic scripts_dtc include/generated/utsrelease.h $(Q)$(MAKE) $(build)=$(@) # Things we need to do before we recursively start building the kernel @@ -1121,6 +1121,10 @@ dtbs: $(all_dtbs) endif +PHONY += scripts_dtc +scripts_dtc: scripts_basic + $(Q)$(MAKE) $(build)=scripts/dtc + # --------------------------------------------------------------------------- # Modules diff --git a/scripts/Makefile b/scripts/Makefile index a780f05bd90f..6d89af7d4f35 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -62,8 +62,7 @@ userccflags += -I $(srctree)/$(src)/include -isystem $(srctree)/scripts/include subdir-y += mod subdir-y += imx -subdir-$(CONFIG_DTC) += dtc subdir-$(CONFIG_ARCH_TEGRA) += tegra # Let clean descend into subdirs -subdir- += basic kconfig +subdir- += basic dtc kconfig -- 2.39.5