This if_change_rule is not working; it cannot detect any command line
changes.
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 <masahiroy@kernel.org>
---
scripts/Makefile.lib | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
The dt_binding_check is added to PHONY, but it is visible only
when $(dtstree) is not empty. So, it is not specified as phony
for ARCH=x86 etc.
Add it to PHONY outside the ifneq ... endif block.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
The dtbs_check should be a phony target, but currently it is not
specified so.
'make dtbs_check' works even if a file named 'dtbs_check' exists
because it depends on another phony target, scripts_dtc, but we
should not rely on it.
Add dtbs_check to PHONY.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Since commit 93512dad334d ("dt-bindings: Improve validation build error
handling"), 'make dtbs_check' does not validate the schema fully.
If you want to check everything, you need to run two commands.
$ make ARCH=arm dt_binding_check
$ make ARCH=arm dtbs_check
You cannot do:
$ make ARCH=arm dt_binding_check dtbs_check
Because CHECK_DTBS is set, dt-doc-validate and dt-extract-example
are skipped.
Making it work will be useful for schema writers.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Documentation/devicetree/bindings/Makefile | 6 ++----
Documentation/devicetree/writing-schema.rst | 4 ++++
Makefile | 8 +++++---
3 files changed, 11 insertions(+), 7 deletions(-)
@@ -147,6 +147,10 @@ Note that ``dtbs_check`` will skip any binding schema files with errors. It is necessary to use ``dt_binding_check`` to get all the validation errors in the binding schema files.+It is possible to run both in a single command::++ make dt_binding_check dtbs_check+ It is also possible to run checks with a single schema file by setting the``DT_SCHEMA_FILES`` variable to a specific schema file.
From: Rob Herring <robh@kernel.org> Date: 2020-02-24 22:52:58
On Sun, Feb 23, 2020 at 04:04:31AM +0900, Masahiro Yamada wrote:
This if_change_rule is not working; it cannot detect any command line
changes.
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 <masahiroy@kernel.org>
---
scripts/Makefile.lib | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
For the series,
Acked-by: Rob Herring <robh@kernel.org>
I'm assuming you will take these? If not, I can in the DT tree.
Rob
Hi Rob,
On Tue, Feb 25, 2020 at 7:52 AM Rob Herring [off-list ref] wrote:
On Sun, Feb 23, 2020 at 04:04:31AM +0900, Masahiro Yamada wrote:
quoted
This if_change_rule is not working; it cannot detect any command line
changes.
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 <masahiroy@kernel.org>
---
scripts/Makefile.lib | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
For the series,
Acked-by: Rob Herring <robh@kernel.org>
I'm assuming you will take these? If not, I can in the DT tree.
Yes, I will queue these to kbuild tree.
--
Best Regards
Masahiro Yamada
On Sun, Feb 23, 2020 at 4:04 AM Masahiro Yamada [off-list ref] wrote:
Since commit 93512dad334d ("dt-bindings: Improve validation build error
handling"), 'make dtbs_check' does not validate the schema fully.
If you want to check everything, you need to run two commands.
$ make ARCH=arm dt_binding_check
$ make ARCH=arm dtbs_check
You cannot do:
$ make ARCH=arm dt_binding_check dtbs_check
Because CHECK_DTBS is set, dt-doc-validate and dt-extract-example
are skipped.
Making it work will be useful for schema writers.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Sorry, I take back this patch.
'make dtbs_check dt_binding_chec' does not work.
@@ -147,6 +147,10 @@ Note that ``dtbs_check`` will skip any binding schema files with errors. It is necessary to use ``dt_binding_check`` to get all the validation errors in the binding schema files.+It is possible to run both in a single command::++ make dt_binding_check dtbs_check+ It is also possible to run checks with a single schema file by setting the``DT_SCHEMA_FILES`` variable to a specific schema file.
On Tue, Feb 25, 2020 at 1:32 PM Masahiro Yamada [off-list ref] wrote:
Hi Rob,
On Tue, Feb 25, 2020 at 7:52 AM Rob Herring [off-list ref] wrote:
quoted
On Sun, Feb 23, 2020 at 04:04:31AM +0900, Masahiro Yamada wrote:
quoted
This if_change_rule is not working; it cannot detect any command line
changes.
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 <masahiroy@kernel.org>
---
scripts/Makefile.lib | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
For the series,
Acked-by: Rob Herring <robh@kernel.org>
I'm assuming you will take these? If not, I can in the DT tree.
Yes, I will queue these to kbuild tree.
Applied with Rob's Ack.
--
Best Regards
Masahiro Yamada
On Sun, Feb 23, 2020 at 4:04 AM Masahiro Yamada [off-list ref] wrote:
The dtbs_check should be a phony target, but currently it is not
specified so.
'make dtbs_check' works even if a file named 'dtbs_check' exists
because it depends on another phony target, scripts_dtc, but we
should not rely on it.
Add dtbs_check to PHONY.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
On Sun, Feb 23, 2020 at 4:04 AM Masahiro Yamada [off-list ref] wrote:
The dt_binding_check is added to PHONY, but it is visible only
when $(dtstree) is not empty. So, it is not specified as phony
for ARCH=x86 etc.
Add it to PHONY outside the ifneq ... endif block.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---