* [PATCH v2] kbuild: make KBUILD_SHELL overridable and document it
@ 2014-06-10 10:27 Masahiro Yamada
2014-06-10 11:26 ` Michal Marek
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2014-06-10 10:27 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, Sam Ravnborg, Michal Marek
It seems reasonable enough to allow users to change KBUILD_SHELL from
environments. Also describe it in Documentation/kbuild/kbuild.txt.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Michal Marek <mmarek@suse.cz>
---
Changes in v2:
- set KBUILD_SHELL by "?="
Documentation/kbuild/kbuild.txt | 5 +++++
Makefile | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index 6466704..425cd2e 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -233,3 +233,8 @@ KBUILD_VMLINUX_MAIN
All object files for the main part of vmlinux.
KBUILD_VMLINUX_INIT and KBUILD_VMLINUX_MAIN together specify
all the object files used to link vmlinux.
+
+KBUILD_SHELL
+--------------------------------------------------
+Specify which shell to use to run shell scripts in Kbuild.
+Assigned by the top-level Makefile.
diff --git a/Makefile b/Makefile
index f691dc2..079f663 100644
--- a/Makefile
+++ b/Makefile
@@ -235,7 +235,7 @@ KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG
# SHELL used by kbuild
-KBUILD_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+KBUILD_SHELL ?= $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] kbuild: make KBUILD_SHELL overridable and document it
2014-06-10 10:27 [PATCH v2] kbuild: make KBUILD_SHELL overridable and document it Masahiro Yamada
@ 2014-06-10 11:26 ` Michal Marek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2014-06-10 11:26 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild; +Cc: Sam Ravnborg
On 2014-06-10 12:27, Masahiro Yamada wrote:
> It seems reasonable enough to allow users to change KBUILD_SHELL from
> environments. Also describe it in Documentation/kbuild/kbuild.txt.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Michal Marek <mmarek@suse.cz>
> ---
>
> Changes in v2:
> - set KBUILD_SHELL by "?="
Um, that's not really what I meant. That the variable cannot be changed
from the environment is a good thing, in my opinion. One can override it
to test if the scripts are compatible with e.g. dash, but it's unlikely
to be used for some other reason by regular users or kernel developers.
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-10 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-10 10:27 [PATCH v2] kbuild: make KBUILD_SHELL overridable and document it Masahiro Yamada
2014-06-10 11:26 ` Michal Marek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.