From 117ccb6cc41e3bf8f5b6ab50bcbf0d77cd845405 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Thu, 31 Jul 2025 19:29:35 +0200 Subject: [PATCH] Makefile: silence list-defconfigs for br2-external with no defconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Julien Olivain --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fa82afa49c..540183f16e 100644 --- a/Makefile +++ b/Makefile @@ -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 \