From b89ee4e73c058eb42e3c3bfb99f354e2144ae652 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 28 Aug 2022 09:51:13 +0300 Subject: [PATCH] aedi: better install customization `install` command line argument is implicit only when no options are specified, and it needs to be added explicitly otherwise --- aedi/target/base.py | 4 ++-- aedi/target/library_tier1.py | 4 +++- aedi/target/library_tier3.py | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/aedi/target/base.py b/aedi/target/base.py index fc4f8927..39de9e21 100644 --- a/aedi/target/base.py +++ b/aedi/target/base.py @@ -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) diff --git a/aedi/target/library_tier1.py b/aedi/target/library_tier1.py index 517fbc1a..efdb6e53 100644 --- a/aedi/target/library_tier1.py +++ b/aedi/target/library_tier1.py @@ -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') diff --git a/aedi/target/library_tier3.py b/aedi/target/library_tier3.py index c8c60417..adf665d8 100644 --- a/aedi/target/library_tier3.py +++ b/aedi/target/library_tier3.py @@ -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)