Skip to content

Commit fa714cf

Browse files
masahir0yrobherring
authored andcommitted
dt-bindings: fix error in 'make clean' after 'make dt_binding_check'
We are having more and more schema files. Commit 8b6b802 ("dt-bindings: Fix command line length limit calling dt-mk-schema") fixed the 'Argument list too long' error of the schema checks, but the same error happens while cleaning too. 'make clean' after 'make dt_binding_check' fails as follows: $ make dt_binding_check [ snip ] $ make clean make[2]: execvp: /bin/sh: Argument list too long make[2]: *** [scripts/Makefile.clean:52: __clean] Error 127 make[1]: *** [scripts/Makefile.clean:66: Documentation/devicetree/bindings] Error 2 make: *** [Makefile:1763: _clean_Documentation] Error 2 'make dt_binding_check' generates so many .example.dts, .dt.yaml files, which are passed to the 'rm' command when you run 'make clean'. I added a small hack to use the 'find' command to clean up most of the build artifacts before they are processed by scripts/Makefile.clean Signed-off-by: Masahiro Yamada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]>
1 parent 35b9c0f commit fa714cf

File tree

1 file changed

+5
-0
lines changed
  • Documentation/devicetree/bindings

1 file changed

+5
-0
lines changed

Documentation/devicetree/bindings/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,8 @@ $(obj)/processed-schema.yaml: $(DT_SCHEMA_FILES) check_dtschema_version FORCE
5454
$(call if_changed,mk_schema)
5555

5656
extra-y += processed-schema.yaml
57+
58+
# Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of
59+
# build artifacts here before they are processed by scripts/Makefile.clean
60+
clean-files = $(shell find $(obj) \( -name '*.example.dts' -o \
61+
-name '*.example.dt.yaml' \) -delete 2>/dev/null)

0 commit comments

Comments
 (0)