From patchwork Tue Jun 10 10:27:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 4327671 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2EEE4BEEAA for ; Tue, 10 Jun 2014 10:27:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5460520034 for ; Tue, 10 Jun 2014 10:27:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C8012026C for ; Tue, 10 Jun 2014 10:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751866AbaFJK1n (ORCPT ); Tue, 10 Jun 2014 06:27:43 -0400 Received: from smtp.mei.co.jp ([133.183.100.20]:44234 "EHLO smtp.mei.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144AbaFJK1m (ORCPT ); Tue, 10 Jun 2014 06:27:42 -0400 Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile11) with ESMTP id s5AARTJN028414; Tue, 10 Jun 2014 19:27:29 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili15) with ESMTP id s5AARTB07793; Tue, 10 Jun 2014 19:27:29 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi14) id s5AART66001643; Tue, 10 Jun 2014 19:27:29 +0900 Received: from poodle by lomi14.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s5AARTWQ001626; Tue, 10 Jun 2014 19:27:29 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 594662740043; Tue, 10 Jun 2014 19:27:29 +0900 (JST) From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Sam Ravnborg , Michal Marek Subject: [PATCH v2] kbuild: make KBUILD_SHELL overridable and document it Date: Tue, 10 Jun 2014 19:27:23 +0900 Message-Id: <1402396043-31532-1-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Sam Ravnborg Cc: Michal Marek --- 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)