summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-04-07 18:23:59 (GMT)
committerGitHub <noreply@github.com>2023-04-07 18:23:59 (GMT)
commita90863c993157ae65e040476cf46abd73ae54b4a (patch)
tree3546014c57273c72681505fb9095f5f4ff15bfcb
parent2667452945eb0a3b8993bb4298ca8da54dc0155a (diff)
downloadcpython-a90863c993157ae65e040476cf46abd73ae54b4a.zip
cpython-a90863c993157ae65e040476cf46abd73ae54b4a.tar.gz
cpython-a90863c993157ae65e040476cf46abd73ae54b4a.tar.bz2
gh-100220: Fix error handling in make rules (GH-100328)
Set `SHELL = /bin/sh -e` to ensure that complex recipes fail on the first error rather than incorrectly reporting success. Co-authored-by: Zachary Ware <zach@python.org>
-rw-r--r--Makefile.pre.in2
-rw-r--r--Misc/NEWS.d/next/Build/2022-12-18-07-24-44.gh-issue-100220.BgSV7C.rst4
2 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 1c1bddc..fefa5d4 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -59,7 +59,7 @@ DSYMUTIL_PATH= @DSYMUTIL_PATH@
GNULD= @GNULD@
# Shell used by make (some versions default to the login shell, which is bad)
-SHELL= /bin/sh
+SHELL= /bin/sh -e
# Use this to make a link between python$(VERSION) and python in $(BINDIR)
LN= @LN@
diff --git a/Misc/NEWS.d/next/Build/2022-12-18-07-24-44.gh-issue-100220.BgSV7C.rst b/Misc/NEWS.d/next/Build/2022-12-18-07-24-44.gh-issue-100220.BgSV7C.rst
new file mode 100644
index 0000000..7135317
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2022-12-18-07-24-44.gh-issue-100220.BgSV7C.rst
@@ -0,0 +1,4 @@
+Changed the default value of the ``SHELL`` Makefile variable from ``/bin/sh``
+to ``/bin/sh -e`` to ensure that complex recipes correctly fail after an error.
+Previously, ``make install`` could fail to install some files and yet return
+a successful result.