From 508003189a4739c839c95e639ea332a0263b9461 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 8 May 2011 22:57:57 +0200 Subject: [PATCH] config: add generated help entries only if present Signed-off-by: "Yann E. MORIN" --- config/config.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config/config.mk b/config/config.mk index 13b9da32..8cb63f81 100644 --- a/config/config.mk +++ b/config/config.mk @@ -95,8 +95,10 @@ define build_gen_choice_in fi; \ sed -r -e '/^## depends on /!d; s/^## / /;' $${file} 2>/dev/null;\ sed -r -e '/^## select /!d; s/^## / /;' $${file} 2>/dev/null; \ - echo " help"; \ - sed -r -e '/^## help ?/!d; s/^## help ?/ /;' $${file} 2>/dev/null; \ + if grep -E '^## help' $${file} >/dev/null 2>&1; then \ + echo " help"; \ + sed -r -e '/^## help ?/!d; s/^## help ?/ /;' $${file} 2>/dev/null; \ + fi; \ echo ""; \ done; \ echo "endchoice"; \ @@ -159,8 +161,10 @@ define build_gen_menu_in echo " prompt \"$${entry}\""; \ sed -r -e '/^## depends on /!d; s/^## / /;' $${file} 2>/dev/null;\ sed -r -e '/^## select /!d; s/^## / /;' $${file} 2>/dev/null; \ - echo " help"; \ - sed -r -e '/^## help ?/!d; s/^## help ?/ /;' $${file} 2>/dev/null; \ + if grep -E '^## help' $${file} >/dev/null 2>&1; then \ + echo " help"; \ + sed -r -e '/^## help ?/!d; s/^## help ?/ /;' $${file} 2>/dev/null; \ + fi; \ echo ""; \ echo "if $(3)_$${_entry}"; \ echo "source \"$${file}\""; \