From: Masahiro Yamada <masahiroy@kernel.org>
Date: Tue, 21 Apr 2020 03:35:28 +0000 (+0900)
Subject: kbuild: fix DT binding schema rule again to avoid needless rebuilds
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3d4b2238684a;p=linux.git

kbuild: fix DT binding schema rule again to avoid needless rebuilds

Since commit 7a0496056064 ("kbuild: fix DT binding schema rule to detect
command line changes"), this rule is every time re-run even if you change
nothing.

cmd_dtc takes one additional parameter to pass to the -O option of dtc.

We need to pass 'yaml' to if_changed_rule. Otherwise, cmd-check invoked
from if_changed_rule is false positive.

Fixes: 7a0496056064 ("kbuild: fix DT binding schema rule to detect command line changes")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 97547108ee7fd..4b799737722c8 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -309,7 +309,7 @@ define rule_dtc
 endef
 
 $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
-	$(call if_changed_rule,dtc)
+	$(call if_changed_rule,dtc,yaml)
 
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)