Skip to content

Commit 7a04960

Browse files
committed
kbuild: fix DT binding schema rule to detect command line changes
This if_change_rule is not working properly; it cannot detect any command line change. The reason is because cmd-check in scripts/Kbuild.include compares $(cmd_$@) and $(cmd_$1), but cmd_dtc_dt_yaml does not exist here. For if_change_rule to work properly, the stem part of cmd_* and rule_* must match. Because this cmd_and_fixdep invokes cmd_dtc, this rule must be named rule_dtc. Fixes: 4f0e3a5 ("kbuild: Add support for DT binding schema checks") Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Rob Herring <[email protected]>
1 parent eccbde4 commit 7a04960

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/Makefile.lib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,13 @@ DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.yaml
302302
quiet_cmd_dtb_check = CHECK $@
303303
cmd_dtb_check = $(DT_CHECKER) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ ;
304304

305-
define rule_dtc_dt_yaml
305+
define rule_dtc
306306
$(call cmd_and_fixdep,dtc,yaml)
307307
$(call cmd,dtb_check)
308308
endef
309309

310310
$(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
311-
$(call if_changed_rule,dtc_dt_yaml)
311+
$(call if_changed_rule,dtc)
312312

313313
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
314314

0 commit comments

Comments
 (0)