Makefile: silence list-defconfigs for br2-external with no defconfig

When a br2-external tree has no defconfig, list-defconfig currently
whines with an error from find:

    find: ‘[...]/my-external/configs’: No such file or directory

Fix that by only running find if the directory exists.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Yann E. MORIN
2025-07-31 19:29:35 +02:00
committed by Julien Olivain
parent 161d7ded43
commit 117ccb6cc4

View File

@@ -1219,7 +1219,7 @@ help:
# $(2): br2-external name, empty for bundled
define list-defconfigs
@first=true; \
for defconfig in $$(find $(1)/configs -name '*_defconfig' |sort); do \
for defconfig in $$([ -d $(1)/configs ] && find $(1)/configs -name '*_defconfig' |sort); do \
[ -f "$${defconfig}" ] || continue; \
if $${first}; then \
if [ "$(2)" ]; then \