kbuild: allow to run dt_binding_check without kernel configuration
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 4 Mar 2020 03:20:38 +0000 (12:20 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Fri, 13 Mar 2020 01:04:36 +0000 (10:04 +0900)
commit9dffecc1339b1f446213a9ba2f19579d9db4d7c7
tree19926480a9bc4fddb560eec79e7ec2a0d78ccd04
parente10c4321dc1e017e472c3fa40bb4e93355921e67
kbuild: allow to run dt_binding_check without kernel configuration

The dt_binding_check target is located outside of the
'ifneq ($(dtstree),) ... endif' block.

So, you can run 'make dt_binding_check' on any architecture.
This makes a perfect sense because the dt-schema is arch-agnostic.

The only one problem I see is that scripts/dtc/dtc is not always built.
For example, ARCH=x86 defconfig does not define CONFIG_DTC. Kbuild
descends into scripts/dtc/ with doing nothing. Then, it fails to build
*.example.dt.yaml files.

Let's build scripts/dtc/dtc forcibly when running dt_binding_check.

The dt-schema does not depend on any CONFIG option either, so you
should be able to run dt_binding_check without the .config file.

Going forward, you can directly run 'make dt_binding_check' in a
pristine source tree.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Makefile
scripts/dtc/Makefile