All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liangcai Fan <fanliangcai9@gmail.com>
To: masahiroy@kernel.org, michal.lkml@markovi.net
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	zhang.lyra@gmail.com, gengcixi@gmail.com, orson.zhai@unisoc.com,
	Liangcai Fan <liangcai.fan@unisoc.com>,
	Liangcai Fan <fanliangcai9@gmail.com>
Subject: [PATCH] use bash instead of sh to run mkcompile_h
Date: Wed, 25 Dec 2019 13:58:03 +0800	[thread overview]
Message-ID: <1577253483-24358-1-git-send-email-fanliangcai9@gmail.com> (raw)

From: Liangcai Fan <liangcai.fan@unisoc.com>

Use sh to run mkcompile_h, compilation would fail if whoami contains
backslash, since sh uses dash. The reason is that the echo command would
interpret backslash to escapes, so the LINUX_COMPILE_BY definition was
incorrect.

Parse mkcompile_h with bash, the echo command would not see backslash as
escapes, then there is no error with the definition of LINUX_COMPILE_BY.

Signed-off-by: Liangcai Fan <liangcai.fan@unisoc.com>
Signed-off-by: Liangcai Fan <fanliangcai9@gmail.com>
---
 init/Makefile       | 2 +-
 scripts/mkcompile_h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/Makefile b/init/Makefile
index 6246a06..9348d17 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -33,6 +33,6 @@ $(obj)/version.o: include/generated/compile.h
 silent_chk_compile.h = :
 include/generated/compile.h: FORCE
 	@$($(quiet)chk_compile.h)
-	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@	\
+	$(Q)$(BASH) $(srctree)/scripts/mkcompile_h $@	\
 	"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)"	\
 	"$(CONFIG_PREEMPT_RT)" "$(CC) $(KBUILD_CFLAGS)"
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 3a5a4b2..cfc2e2a 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
 TARGET=$1
-- 
1.9.1


             reply	other threads:[~2019-12-25  5:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25  5:58 Liangcai Fan [this message]
2019-12-26  9:25 ` [PATCH] use bash instead of sh to run mkcompile_h Masahiro Yamada

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=1577253483-24358-1-git-send-email-fanliangcai9@gmail.com \
    --to=fanliangcai9@gmail.com \
    --cc=gengcixi@gmail.com \
    --cc=liangcai.fan@unisoc.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=orson.zhai@unisoc.com \
    --cc=zhang.lyra@gmail.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 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.