Install make

This commit is contained in:
Matthieu Gautier 2022-02-21 17:10:09 +01:00
parent 29678055d0
commit d3c275f349
3 changed files with 13 additions and 4 deletions

View File

@ -26,7 +26,7 @@ jobs:
chmod 600 $SSH_KEY
- name: Install packages
run: |
choco.exe install pkgconfiglite ninja
choco.exe install pkgconfiglite ninja make
#- run: |
#ls
#libtoolize

View File

@ -21,6 +21,9 @@ class PlatformNeutralEnv:
self.log_dir):
os.makedirs(d, exist_ok=True)
self.detect_platform()
self.make_command = self._detect_make()
if not self.make_command:
sys.exit("ERROR: make command not found.")
self.ninja_command = self._detect_ninja()
if not self.ninja_command:
sys.exit("ERROR: ninja command not found.")
@ -55,6 +58,8 @@ class PlatformNeutralEnv:
if retcode == 0:
return n
def _detect_make(self):
return self._detect_binary('make.exe', 'make')
def _detect_ninja(self):
return self._detect_binary('ninja', 'ninja-build')

View File

@ -379,7 +379,8 @@ class MakeBuilder(Builder):
def _compile(self, context):
context.try_skip(self.build_path)
command = "make -j4 {make_target} {make_option}".format(
command = "{command} -j4 {make_target} {make_option}".format(
command=neutralEnv('make_command'),
make_target=self.make_target,
make_option=self.make_option
)
@ -388,7 +389,8 @@ class MakeBuilder(Builder):
def _install(self, context):
context.try_skip(self.build_path)
command = "make {make_install_target} {make_option}".format(
command = "{command} {make_install_target} {make_option}".format(
command=neutralEnv('make_command'),
make_install_target=self.make_install_target,
make_option=self.make_option
)
@ -397,7 +399,9 @@ class MakeBuilder(Builder):
def _make_dist(self, context):
context.try_skip(self.build_path)
command = "make dist"
command = "{command} dist".format(
command=neutralEnv('make_command'),
)
env = self.get_env(cross_comp_flags=True, cross_compilers=True, cross_path=True)
run_command(command, self.build_path, context, env=env)