public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kconfig: add -e and -u options to *conf-cfg.sh scripts
@ 2024-06-11 16:08 Masahiro Yamada
  2024-06-11 16:08 ` [PATCH 2/2] kbuild: package: add -e and -u options to shell scripts Masahiro Yamada
  2024-06-12 19:28 ` [PATCH 1/2] kconfig: add -e and -u options to *conf-cfg.sh scripts Nicolas Schier
  0 siblings, 2 replies; 8+ messages in thread
From: Masahiro Yamada @ 2024-06-11 16:08 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Masahiro Yamada

Set -e to make these scripts fail on the first error.

Set -u because these scripts are invoked by Makefile, and do not work
properly without necessary variables defined.

Both options are described in POSIX. [1]

[1]: https://pubs.opengroup.org/onlinepubs/009604499/utilities/set.html

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/kconfig/gconf-cfg.sh | 2 ++
 scripts/kconfig/mconf-cfg.sh | 2 ++
 scripts/kconfig/nconf-cfg.sh | 2 ++
 scripts/kconfig/qconf-cfg.sh | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/scripts/kconfig/gconf-cfg.sh b/scripts/kconfig/gconf-cfg.sh
index 040d8f338820..fc954c0538fa 100755
--- a/scripts/kconfig/gconf-cfg.sh
+++ b/scripts/kconfig/gconf-cfg.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 
+set -eu
+
 cflags=$1
 libs=$2
 
diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh
index 1e61f50a5905..1bc304dc2f7d 100755
--- a/scripts/kconfig/mconf-cfg.sh
+++ b/scripts/kconfig/mconf-cfg.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 
+set -eu
+
 cflags=$1
 libs=$2
 
diff --git a/scripts/kconfig/nconf-cfg.sh b/scripts/kconfig/nconf-cfg.sh
index f871a2160e36..a20290b1a37d 100755
--- a/scripts/kconfig/nconf-cfg.sh
+++ b/scripts/kconfig/nconf-cfg.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 
+set -eu
+
 cflags=$1
 libs=$2
 
diff --git a/scripts/kconfig/qconf-cfg.sh b/scripts/kconfig/qconf-cfg.sh
index 0e113b0f2455..bb2df66363a8 100755
--- a/scripts/kconfig/qconf-cfg.sh
+++ b/scripts/kconfig/qconf-cfg.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 
+set -eu
+
 cflags=$1
 libs=$2
 bin=$3
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-16 18:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 16:08 [PATCH 1/2] kconfig: add -e and -u options to *conf-cfg.sh scripts Masahiro Yamada
2024-06-11 16:08 ` [PATCH 2/2] kbuild: package: add -e and -u options to shell scripts Masahiro Yamada
2024-06-12 19:33   ` Nicolas Schier
2024-06-16 15:21   ` Masahiro Yamada
2024-06-16 15:55     ` Nicolas Schier
2024-06-16 16:52       ` Masahiro Yamada
2024-06-16 18:40         ` Nicolas Schier
2024-06-12 19:28 ` [PATCH 1/2] kconfig: add -e and -u options to *conf-cfg.sh scripts Nicolas Schier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox