make emconfigure and emcmake work, kinda

This commit is contained in:
Danny McClanahan
2022-04-20 15:47:51 +00:00
parent 187c0f1d04
commit cc87de83cd
3 changed files with 15 additions and 2 deletions

View File

@@ -512,6 +512,7 @@ def _set_variables_for_single_module(pkg, module):
m.make_jobs = jobs
# TODO: make these build deps that can be installed if not found.
# FIXME: !!!!!
m.make = MakeExecutable('make', jobs)
m.gmake = MakeExecutable('gmake', jobs)
m.scons = MakeExecutable('scons', jobs)
@@ -523,9 +524,15 @@ def _set_variables_for_single_module(pkg, module):
# Find the configure script in the archive path
# Don't use which for this; we want to find it in the current dir.
m.configure = Executable('./configure')
m.emconfigure = Executable('emconfigure')
m.emconfigure.add_default_arg('./configure')
m.meson = Executable('meson')
m.cmake = Executable('cmake')
m.emcmake = Executable('emcmake')
m.emcmake.add_default_arg('cmake')
m.ctest = MakeExecutable('ctest', jobs)
if sys.platform == 'win32':

View File

@@ -419,7 +419,10 @@ def configure(self, spec, prefix):
options += self.configure_args()
with working_dir(self.build_directory, create=True):
inspect.getmodule(self).configure(*options)
if self.spec.satisfies('%emscripten'):
inspect.getmodule(self).emconfigure(*options)
else:
inspect.getmodule(self).configure(*options)
def setup_build_environment(self, env):
if (self.spec.platform == 'darwin'

View File

@@ -374,7 +374,10 @@ def cmake(self, spec, prefix):
options += self.cmake_args()
options.append(os.path.abspath(self.root_cmakelists_dir))
with working_dir(self.build_directory, create=True):
inspect.getmodule(self).cmake(*options)
if self.spec.satisfies('%emscripten'):
inspect.getmodule(self).emcmake(*options)
else:
inspect.getmodule(self).cmake(*options)
def build(self, spec, prefix):
"""Make the build targets"""