mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 05:54:59 +02:00
Fix re-compile of launcher on change not happening
This commit is contained in:
4
setup.py
4
setup.py
@@ -1352,13 +1352,15 @@ def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 's
|
||||
os.makedirs(launcher_dir, exist_ok=True)
|
||||
os.makedirs(build_dir, exist_ok=True)
|
||||
objects = []
|
||||
headers = glob.glob('kitty/launcher/*.h')
|
||||
cppflags.append('-DKITTY_VERSION="' + '.'.join(map(str, version)) + '"')
|
||||
for src in ('kitty/launcher/main.c', 'kitty/launcher/single-instance.c', 'kitty/launcher/cmdline.c'):
|
||||
obj = os.path.join(build_dir, src.replace('/', '-').replace('.c', '.o'))
|
||||
objects.append(obj)
|
||||
cmd = env.cc + cppflags + cflags + ['-c', src, '-o', obj]
|
||||
key = CompileKey(src, os.path.basename(obj))
|
||||
args.compilation_database.add_command(f'Compiling {emphasis(src)} ...', cmd, partial(newer, obj, src), key=key, keyfile=src)
|
||||
args.compilation_database.add_command(
|
||||
f'Compiling {emphasis(src)} ...', cmd, partial(newer, obj, src, *dependecies_for(src, obj, headers)), key=key, keyfile=src)
|
||||
dest = kitty_exe = os.path.join(launcher_dir, 'kitty')
|
||||
link_targets.append(os.path.abspath(dest))
|
||||
desc = f'Linking {emphasis("launcher")} ...'
|
||||
|
||||
Reference in New Issue
Block a user