public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-kbuild@vger.kernel.org
Subject: Re: [Question] Why CONFIG_SHELL
Date: Mon, 9 Jun 2014 13:40:10 +0200	[thread overview]
Message-ID: <20140609114010.GA28767@ravnborg.org> (raw)
In-Reply-To: <20140609192548.95CA.AA925319@jp.panasonic.com>

On Mon, Jun 09, 2014 at 07:25:48PM +0900, Masahiro Yamada wrote:
> Hi Sam,
> 
> 
> On Mon, 9 Jun 2014 09:49:35 +0200
> Sam Ravnborg <sam@ravnborg.org> wrote:
> 
> > On Mon, Jun 09, 2014 at 02:04:12PM +0900, Masahiro Yamada wrote:
> > > Hi experts.
> > > 
> > > I think all the macros with CONFIG_ prefix are supposed to be
> > > defined in Kconfig.
> > > But I've been long wondering why there exists one exception:
> > > CONFIG_SHELL.
> > > 
> > > Is there any historical, or special reason?
> > It has been like this as far back as I remmeber.
> > I assume that one has planned to set the shell in Kconfig back then.
> >  
> > > Is it good to rename it to KBUILD_SHELL or something else?
> > Please do so, to free up the CONFIG_ namespace.
> > 
> > I the end Michal will decide if he want this cleanup.
> > On the top of my head I see no problems in doing this,
> > but maybe there are some out-of-tree modules or similar
> > we need to consider...
> 
> Thanks for your commet.
> 
> Another question popped up.
> 
> 
> CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
>           else if [ -x /bin/bash ]; then echo /bin/bash; \
>           else echo sh; fi ; fi)
> 
> 
> If  bash is not found on the system,  CONFIG_SHELL falls back to  "sh".
> 
> Does it mean,  all shell scripts are written as  sh-compatible ?
Not all - but most.
All shell scripts that are invoked with $(CONFIG_SHELL) must be sh-compatible,
or in practice dash compatible as well as bash compatible.
The preference is bash as expressed with the above code.

	Sam

      reply	other threads:[~2014-06-09 11:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09  5:04 [Question] Why CONFIG_SHELL Masahiro Yamada
2014-06-09  7:49 ` Sam Ravnborg
2014-06-09 10:25   ` Masahiro Yamada
2014-06-09 11:40     ` Sam Ravnborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140609114010.GA28767@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yamada.m@jp.panasonic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox