diff mbox

[U-Boot,v2] kconfig: show an error message when defconfig is not found

Message ID 1409836575-6476-1-git-send-email-yamada.m@jp.panasonic.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada Sept. 4, 2014, 1:16 p.m. UTC
When a non-existing defconfig is specified,
display an easy-to-understand message
(fake the error message on Linux Kernel):

  $ make foo_defconfig
  ***
  *** Can't find default configuration "confis/foo_defconfig"!
  ***

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v2:
  - Echo the error message to stderr

 scripts/multiconfig.sh | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Stephen Warren Sept. 4, 2014, 3:01 p.m. UTC | #1
On 09/04/2014 07:16 AM, Masahiro Yamada wrote:
> When a non-existing defconfig is specified,
> display an easy-to-understand message
> (fake the error message on Linux Kernel):
>
>    $ make foo_defconfig
>    ***
>    *** Can't find default configuration "confis/foo_defconfig"!
>    ***

Acked-by: Stephen Warren <swarren@nvidia.com>
Tom Rini Sept. 17, 2014, 12:46 a.m. UTC | #2
On Thu, Sep 04, 2014 at 10:16:15PM +0900, Masahiro Yamada wrote:

> When a non-existing defconfig is specified,
> display an easy-to-understand message
> (fake the error message on Linux Kernel):
> 
>   $ make foo_defconfig
>   ***
>   *** Can't find default configuration "confis/foo_defconfig"!
>   ***
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Acked-by: Stephen Warren <swarren@nvidia.com>

Applied to u-boot/master, thanks!
York Sun Oct. 1, 2014, 3:29 p.m. UTC | #3
On 09/04/2014 06:16 AM, Masahiro Yamada wrote:
> When a non-existing defconfig is specified,
> display an easy-to-understand message
> (fake the error message on Linux Kernel):
> 
>   $ make foo_defconfig
>   ***
>   *** Can't find default configuration "confis/foo_defconfig"!
>   ***
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> ---
> 
> Changes in v2:
>   - Echo the error message to stderr
> 
>  scripts/multiconfig.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh
> index a579042..49fcfad 100644
> --- a/scripts/multiconfig.sh
> +++ b/scripts/multiconfig.sh
> @@ -118,6 +118,13 @@ do_board_defconfig () {
>  	defconfig_path=$srctree/configs/$1
>  	tmp_defconfig_path=configs/.tmp_defconfig
>  
> +	if [ ! -r $defconfig_path ]; then
> +		echo >&2 "***"
> +		echo >&2 "*** Can't find default configuration \"confis/$1\"!"

s/confis/configs/

York
Masahiro Yamada Oct. 1, 2014, 3:40 p.m. UTC | #4
Hi York.



2014-10-02 0:29 GMT+09:00 York Sun <yorksun@freescale.com>:
>> +     if [ ! -r $defconfig_path ]; then
>> +             echo >&2 "***"
>> +             echo >&2 "*** Can't find default configuration \"confis/$1\"!"
>
> s/confis/configs/
>

Oops!
Thanks for spotting this.

Could send a patch, please?
diff mbox

Patch

diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh
index a579042..49fcfad 100644
--- a/scripts/multiconfig.sh
+++ b/scripts/multiconfig.sh
@@ -118,6 +118,13 @@  do_board_defconfig () {
 	defconfig_path=$srctree/configs/$1
 	tmp_defconfig_path=configs/.tmp_defconfig
 
+	if [ ! -r $defconfig_path ]; then
+		echo >&2 "***"
+		echo >&2 "*** Can't find default configuration \"confis/$1\"!"
+		echo >&2 "***"
+		exit 1
+	fi
+
 	mkdir -p arch configs
 	# defconfig for Normal:
 	#  pick lines without prefixes and lines starting '+' prefix