summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-08-14 01:58:22 -0500
committerGitHub <noreply@github.com>2020-08-14 08:58:22 +0200
commitc27e82f0ac48d4839203d87435619bce31be354a (patch)
treefe271e62c13d67eb5bf84b0640898aba76acfeae /var
parent5eea09d43d32d060691f12c13176884121d68a5d (diff)
downloadspack-c27e82f0ac48d4839203d87435619bce31be354a.tar.gz
spack-c27e82f0ac48d4839203d87435619bce31be354a.tar.bz2
spack-c27e82f0ac48d4839203d87435619bce31be354a.tar.xz
spack-c27e82f0ac48d4839203d87435619bce31be354a.zip
gmake: add spack external find support (#18009)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gmake/package.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/gmake/package.py b/var/spack/repos/builtin/packages/gmake/package.py
index fe6e58f15e..58f1ebe5a7 100644
--- a/var/spack/repos/builtin/packages/gmake/package.py
+++ b/var/spack/repos/builtin/packages/gmake/package.py
@@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
+import re
class Gmake(AutotoolsPackage, GNUMirrorPackage):
@@ -29,6 +29,14 @@ class Gmake(AutotoolsPackage, GNUMirrorPackage):
patch('https://src.fedoraproject.org/rpms/make/raw/519a7c5bcbead22e6ea2d2c2341d981ef9e25c0d/f/make-4.2.1-glob-fix-2.patch', level=1, sha256='fe5b60d091c33f169740df8cb718bf4259f84528b42435194ffe0dd5b79cd125', when='@4.2.1')
patch('https://src.fedoraproject.org/rpms/make/raw/519a7c5bcbead22e6ea2d2c2341d981ef9e25c0d/f/make-4.2.1-glob-fix-3.patch', level=1, sha256='ca60bd9c1a1b35bc0dc58b6a4a19d5c2651f7a94a4b22b2c5ea001a1ca7a8a7f', when='@:4.2.1')
+ executables = ['^g?make$']
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)('--version', output=str, error=str)
+ match = re.search(r'GNU Make (\S+)', output)
+ return match.group(1) if match else None
+
def configure_args(self):
args = []