blob: d797bc7addcde9fd483ae7c0b66e4cfa0989fef0 [file] [log] [blame]
From 100de052ceebf901995c7f60c11c57f291337485 Mon Sep 17 00:00:00 2001
From: Masahiro Yamada <>
Date: Sun, 23 Feb 2020 04:04:31 +0900
Subject: [PATCH] kbuild: fix DT binding schema rule to detect command line
commit 7a04960560640ac5b0b89461f7757322b57d0c7a upstream.
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: 4f0e3a57d6eb ("kbuild: Add support for DT binding schema checks")
Signed-off-by: Masahiro Yamada <>
Acked-by: Rob Herring <>
Signed-off-by: Paul Gortmaker <>
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index f1f38c8cdc74..85add8648fe9 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -300,13 +300,13 @@ DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.yaml
quiet_cmd_dtb_check = CHECK $@
cmd_dtb_check = $(DT_CHECKER) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ ;
-define rule_dtc_dt_yaml
+define rule_dtc
$(call cmd_and_fixdep,dtc,yaml)
$(call cmd,dtb_check)
$(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
- $(call if_changed_rule,dtc_dt_yaml)
+ $(call if_changed_rule,dtc)
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)