M4: add spack external find support (#16693)
This commit is contained in:
parent
f901947f69
commit
73fe3ce158
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
import re
|
||||||
|
|
||||||
|
|
||||||
class M4(AutotoolsPackage, GNUMirrorPackage):
|
class M4(AutotoolsPackage, GNUMirrorPackage):
|
||||||
@ -32,6 +32,18 @@ class M4(AutotoolsPackage, GNUMirrorPackage):
|
|||||||
|
|
||||||
build_directory = 'spack-build'
|
build_directory = 'spack-build'
|
||||||
|
|
||||||
|
executables = ['^g?m4$']
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def determine_version(cls, exe):
|
||||||
|
# Output on macOS:
|
||||||
|
# GNU M4 1.4.6
|
||||||
|
# Output on Linux:
|
||||||
|
# m4 (GNU M4) 1.4.18
|
||||||
|
output = Executable(exe)('--version', output=str, error=str)
|
||||||
|
match = re.search(r'GNU M4\)?\s+(\S+)', output)
|
||||||
|
return match.group(1) if match else None
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
args = ['--enable-c++']
|
args = ['--enable-c++']
|
||||||
|
Loading…
Reference in New Issue
Block a user