From 604a57ba9781181b4b27443520b1b6c65398deae Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 5 Apr 2024 17:56:03 -0500 Subject: dt-bindings: kbuild: Add separate target/dependency for processed-schema.json Running dtbs_check and dt_compatible_check targets really only depend on processed-schema.json, but the dependency is 'dt_binding_check'. That was sort worked around with the CHECK_DT_BINDING variable in order to skip some of the work that 'dt_binding_check' does. It still runs the full checks of the schemas which is not necessary and adds 10s of seconds to the build time. That's significant when checking only a few DTBs and with recent changes that have improved the validation time by 6-7x. Add a new target, dt_binding_schema, which just builds processed-schema.json and can be used as the dependency for other targets. The scripts_dtc dependency isn't needed either as the examples aren't built for it. Signed-off-by: Rob Herring Tested-by: Conor Dooley Signed-off-by: Masahiro Yamada --- Makefile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 43b10f3d438c..026971f9f6bc 100644 --- a/Makefile +++ b/Makefile @@ -1403,7 +1403,7 @@ export CHECK_DTBS=y endif ifneq ($(CHECK_DTBS),) -dtbs_prepare: dt_binding_check +dtbs_prepare: dt_binding_schemas endif dtbs_check: dtbs @@ -1422,15 +1422,18 @@ scripts_dtc: scripts_basic $(Q)$(MAKE) $(build)=scripts/dtc ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),) -export CHECK_DT_BINDING=y +export CHECK_DTBS=y endif -PHONY += dt_binding_check -dt_binding_check: scripts_dtc +PHONY += dt_binding_check dt_binding_schemas +dt_binding_check: dt_binding_schemas scripts_dtc + $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@ + +dt_binding_schemas: $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings PHONY += dt_compatible_check -dt_compatible_check: dt_binding_check +dt_compatible_check: dt_binding_schemas $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@ # --------------------------------------------------------------------------- @@ -1626,10 +1629,11 @@ help: @echo '' @$(if $(dtstree), \ echo 'Devicetree:'; \ - echo '* dtbs - Build device tree blobs for enabled boards'; \ - echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \ - echo ' dt_binding_check - Validate device tree binding documents'; \ - echo ' dtbs_check - Validate device tree source files';\ + echo '* dtbs - Build device tree blobs for enabled boards'; \ + echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \ + echo ' dt_binding_check - Validate device tree binding documents and examples'; \ + echo ' dt_binding_schema - Build processed device tree binding schemas'; \ + echo ' dtbs_check - Validate device tree source files';\ echo '') @echo 'Userspace tools targets:' -- cgit v1.2.3-58-ga151