aedi: better install customization

`install` command line argument is implicit only when no options are specified, and it needs to be added explicitly otherwise
This commit is contained in:
alexey.lysiuk 2022-08-28 09:51:13 +03:00
parent 80c4a917a3
commit b89ee4e73c
3 changed files with 9 additions and 4 deletions

View file

@ -133,8 +133,8 @@ class BuildTarget(Target):
if state.install_path.exists():
shutil.rmtree(state.install_path)
args = [tool, 'install']
args += options and options.to_list() or []
args = [tool]
args += options and options.to_list() or ['install']
subprocess.run(args, check=True, cwd=state.build_path, env=state.environment)

View file

@ -43,7 +43,9 @@ class Bzip2Target(MakeTarget):
opts[cflags] = state.environment[cflags] + ' -D_FILE_OFFSET_BITS=64 -O2'
def post_build(self, state: BuildState):
state.options['PREFIX'] = state.install_path
opts = state.options
opts['install'] = None
opts['PREFIX'] = state.install_path
self.install(state, state.options)
self.write_pc_file(state, description='bzip2 compression library', version='1.0.8', libs='-lbz2')

View file

@ -241,7 +241,10 @@ class LuaTarget(MakeTarget):
return state.has_source_file('src/lua.h')
def post_build(self, state: BuildState):
state.options['INSTALL_TOP'] = state.install_path
opts = state.options
opts['install'] = None
opts['INSTALL_TOP'] = state.install_path
self.install(state, state.options)