Introduce configure and make wrapper.
This way, we can use small wrapper tools from sdk to run configure and make.
This commit is contained in:
parent
3c445389be
commit
ce82860b85
|
@ -148,3 +148,21 @@ class BuildEnv:
|
||||||
if cross_path:
|
if cross_path:
|
||||||
env['PATH'] = ':'.join(self.platformInfo.get_bin_dir() + [env['PATH']])
|
env['PATH'] = ':'.join(self.platformInfo.get_bin_dir() + [env['PATH']])
|
||||||
return env
|
return env
|
||||||
|
|
||||||
|
|
||||||
|
@property
|
||||||
|
def configure_wrapper(self):
|
||||||
|
wrapper = getattr(self.platformInfo, "configure_wrapper", "")
|
||||||
|
if wrapper:
|
||||||
|
return "{} ".format(wrapper)
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def make_wrapper(self):
|
||||||
|
wrapper = getattr(self.platformInfo, "make_wrapper", "")
|
||||||
|
if wrapper:
|
||||||
|
return "{} ".format(wrapper)
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
|
|
@ -368,8 +368,9 @@ class MakeBuilder(Builder):
|
||||||
|
|
||||||
def _configure(self, context):
|
def _configure(self, context):
|
||||||
context.try_skip(self.build_path)
|
context.try_skip(self.build_path)
|
||||||
command = "{configure_script} {configure_option}"
|
command = "{configure_wrapper}{configure_script} {configure_option}"
|
||||||
command = command.format(
|
command = command.format(
|
||||||
|
configure_wrapper=self.buildEnv.configure_wrapper,
|
||||||
configure_script=pj(self.source_path, self.configure_script),
|
configure_script=pj(self.source_path, self.configure_script),
|
||||||
configure_option=self.all_configure_option
|
configure_option=self.all_configure_option
|
||||||
)
|
)
|
||||||
|
@ -379,7 +380,8 @@ class MakeBuilder(Builder):
|
||||||
|
|
||||||
def _compile(self, context):
|
def _compile(self, context):
|
||||||
context.try_skip(self.build_path)
|
context.try_skip(self.build_path)
|
||||||
command = "make -j4 {make_target} {make_option}".format(
|
command = "{make_wrapper}make -j4 {make_target} {make_option}".format(
|
||||||
|
make_wrapper=self.buildEnv.make_wrapper,
|
||||||
make_target=self.make_target,
|
make_target=self.make_target,
|
||||||
make_option=self.make_option
|
make_option=self.make_option
|
||||||
)
|
)
|
||||||
|
@ -388,7 +390,8 @@ class MakeBuilder(Builder):
|
||||||
|
|
||||||
def _install(self, context):
|
def _install(self, context):
|
||||||
context.try_skip(self.build_path)
|
context.try_skip(self.build_path)
|
||||||
command = "make {make_install_target} {make_option}".format(
|
command = "{make_wrapper}make {make_install_target} {make_option}".format(
|
||||||
|
make_wrapper=self.buildEnv.make_wrapper,
|
||||||
make_install_target=self.make_install_target,
|
make_install_target=self.make_install_target,
|
||||||
make_option=self.make_option
|
make_option=self.make_option
|
||||||
)
|
)
|
||||||
|
@ -397,7 +400,9 @@ class MakeBuilder(Builder):
|
||||||
|
|
||||||
def _make_dist(self, context):
|
def _make_dist(self, context):
|
||||||
context.try_skip(self.build_path)
|
context.try_skip(self.build_path)
|
||||||
command = "make dist"
|
command = "{make_wrapper}make dist".format(
|
||||||
|
make_wrapper=self.buildEnv.make_wrapper
|
||||||
|
)
|
||||||
env = self.get_env(cross_comp_flags=True, cross_compilers=True, cross_path=True)
|
env = self.get_env(cross_comp_flags=True, cross_compilers=True, cross_path=True)
|
||||||
run_command(command, self.build_path, context, env=env)
|
run_command(command, self.build_path, context, env=env)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue