diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py index 6e27c333165..c39cbcdabd2 100644 --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -101,16 +101,19 @@ def patch(self): **kwargs) def install(self, spec, prefix): - if self.spec.satisfies('%emscripten'): - make = emmake + def do_make(*args): + if self.spec.satisfies('%emscripten'): + emmake(*args) + else: + make(*args) # Build the dynamic library first if '+shared' in spec: - make('-f', 'Makefile-libbz2_so') + do_make('-f', 'Makefile-libbz2_so') # Build the static library and everything else - make() - make('install', 'PREFIX={0}'.format(prefix)) + do_make() + do_make('install', 'PREFIX={0}'.format(prefix)) if self.spec.satisfies('%emscripten'): install('bzip2.wasm', diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py index 07a3cd6d87c..3fee67a6f32 100644 --- a/var/spack/repos/builtin/packages/zlib/package.py +++ b/var/spack/repos/builtin/packages/zlib/package.py @@ -75,16 +75,23 @@ def install(self, spec, prefix): nmake('-f' 'win32\\Makefile.msc') self.win_install() else: - if self.spec.satisfies('%emscripten'): - configure = emconfigure - make = emmake + def do_configure(*args): + if self.spec.satisfies('%emscripten'): + emconfigure(*args) + else: + configure(*args) + def do_make(*args): + if self.spec.satisfies('%emscripten'): + emmake(*args) + else: + make(*args) config_args = [] if '~shared' in spec: config_args.append('--static') - configure('--prefix={0}'.format(prefix), *config_args) + do_configure('--prefix={0}'.format(prefix), *config_args) - make() + do_make() if self.run_tests: - make('check') - make('install') + do_make('check') + do_make('install')