dt-bindings: Fix error in 'make dtbs_check' when using DT_SCHEMA_FILES
authorCristian Ciocaltea <cristian.ciocaltea@gmail.com>
Wed, 18 Nov 2020 15:20:50 +0000 (17:20 +0200)
committerRob Herring <robh@kernel.org>
Mon, 7 Dec 2020 21:48:39 +0000 (15:48 -0600)
commit96993a59f94db89a3ff0110dc9e3a2af03a1da8b
tree84b662324325dee39b12a0dc765ed1a0bb082a56
parent332dde0a5864bc3f00898b24bf3a21f46f702076
dt-bindings: Fix error in 'make dtbs_check' when using DT_SCHEMA_FILES

If DT_SCHEMA_FILES is specified and contains more than one file paths,
'make dtbs_check' fails with the following message:

  $ make dtbs_check DT_SCHEMA_FILES="path/to/schema1.yaml path/to/schema2.yaml"
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  Documentation/devicetree/bindings/Makefile:77: recipe for target 'Documentation/devicetree/bindings/processed-schema.json' failed
  make[1]: *** [Documentation/devicetree/bindings/processed-schema.json] Error 255
  make[1]: *** Deleting file 'Documentation/devicetree/bindings/processed-schema.json'
  Makefile:1364: recipe for target 'dt_binding_check' failed
  make: *** [dt_binding_check] Error 2

The error code 255 is returned by 'dt-mk-schema' when invoked as
'dt-mk-schema -j -u @<tmp-file>', where '<tmp-file>' is a temporary
file that is generated to contain a list of SPACE delimited schema
file paths, as indicated via DT_SCHEMA_FILES.

However, it seems the file format has been recently changed in
'dt-mk-schema', which now expects each schema path to be provided on
a separate line:

 $ dt-mk-schema --version
 2020.12.dev4+g6de1c45

Therefore, let's change '<tmp-file>' content format from

 path/to/schema1.yaml path/to/schema2.yaml ... path/to/schemaN.yaml

to

 path/to/schema1.yaml
 path/to/schema2.yaml
 ...
 path/to/schemaN.yaml

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Link: https://lore.kernel.org/r/2519b8bde507ca6ccea9765ea197adaaa69a66d5.1605712328.git.cristian.ciocaltea@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/Makefile