build script: simplify installation of single executable targets

This commit is contained in:
alexey.lysiuk 2021-01-07 10:52:25 +02:00
parent 16b2601941
commit 081ab62c46
1 changed files with 3 additions and 12 deletions

View File

@ -958,9 +958,7 @@ class GmakeTarget(ConfigureMakeDependencyTarget):
return os.path.exists(builder.source_path + 'doc/make.1') return os.path.exists(builder.source_path + 'doc/make.1')
def post_build(self, builder: 'Builder'): def post_build(self, builder: 'Builder'):
bin_path = self.prefix + '/bin/' self.copy_to_bin(builder, 'make', self.name)
os.makedirs(bin_path, exist_ok=True)
shutil.copy(builder.build_path + 'make', bin_path + self.name)
class IconvTarget(ConfigureMakeStaticDependencyTarget): class IconvTarget(ConfigureMakeStaticDependencyTarget):
@ -1204,9 +1202,7 @@ class NinjaTarget(MakeTarget):
subprocess.check_call(args, cwd=builder.build_path) subprocess.check_call(args, cwd=builder.build_path)
def post_build(self, builder: 'Builder'): def post_build(self, builder: 'Builder'):
dest_path = builder.deps_path + self.name + os.sep + 'bin' self.copy_to_bin(builder)
os.makedirs(dest_path, exist_ok=True)
shutil.copy(builder.build_path + self.name, dest_path)
class OggTarget(ConfigureMakeStaticDependencyTarget): class OggTarget(ConfigureMakeStaticDependencyTarget):
@ -1308,12 +1304,7 @@ class PkgConfigTarget(ConfigureMakeDependencyTarget):
return os.path.exists(builder.source_path + 'pkg-config.1') return os.path.exists(builder.source_path + 'pkg-config.1')
def post_build(self, builder: 'Builder'): def post_build(self, builder: 'Builder'):
bin_path = self.prefix + '/bin/' self.copy_to_bin(builder, new_filename=self.name + '.exe')
os.makedirs(bin_path, exist_ok=True)
src_path = builder.build_path + 'pkg-config'
dst_path = bin_path + 'pkg-config.exe'
shutil.copy(src_path, dst_path)
class PngTarget(ConfigureMakeStaticDependencyTarget): class PngTarget(ConfigureMakeStaticDependencyTarget):