summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Galby <67924449+Jordan474@users.noreply.github.com>2024-10-14 00:02:49 +0200
committerGitHub <noreply@github.com>2024-10-13 15:02:49 -0700
commit02a991688f795171786fce0da21bf444e3361700 (patch)
treeaca29b9e973d887c75dc7a5e30c908f1c1562477
parenta8029c8ec48cbc42d7daf07b7749e070cba07318 (diff)
downloadspack-02a991688f795171786fce0da21bf444e3361700.tar.gz
spack-02a991688f795171786fce0da21bf444e3361700.tar.bz2
spack-02a991688f795171786fce0da21bf444e3361700.tar.xz
spack-02a991688f795171786fce0da21bf444e3361700.zip
Fix makefile target check with Make jobserver keep-going (#46784)
-rw-r--r--lib/spack/spack/package_base.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py
index f0458e47cc..2f47caaa55 100644
--- a/lib/spack/spack/package_base.py
+++ b/lib/spack/spack/package_base.py
@@ -1855,13 +1855,22 @@ class PackageBase(WindowsRPath, PackageViewMixin, RedistributionMixin, metaclass
#
# BSD Make:
# make: don't know how to make test. Stop
+ #
+ # Note: "Stop." is not printed when running a Make jobserver (spack env depfile) that runs
+ # with `make -k/--keep-going`
missing_target_msgs = [
- "No rule to make target `{0}'. Stop.",
- "No rule to make target '{0}'. Stop.",
- "don't know how to make {0}. Stop",
+ "No rule to make target `{0}'.",
+ "No rule to make target '{0}'.",
+ "don't know how to make {0}.",
]
- kwargs = {"fail_on_error": False, "output": os.devnull, "error": str}
+ kwargs = {
+ "fail_on_error": False,
+ "output": os.devnull,
+ "error": str,
+ # Remove MAKEFLAGS to avoid inherited flags from Make jobserver (spack env depfile)
+ "extra_env": {"MAKEFLAGS": ""},
+ }
stderr = make("-n", target, **kwargs)