From 770bd79a9cad46c67912386ecc1b27a3adb74fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 3 May 2020 17:00:22 +0200 Subject: [PATCH] meson: try to workaround 'tic' writing multiple files into a subdirectory tic writes all our terminfo files into a subdirectory. This is difficult for meson to groc; you can for example not say output: ['f/foot', 'f/foot-direct'] This tries to workaround it by setting 'install: false' in the 'tic' custom target, and instead add two separate targets for each terminfo file. Since the compiled terminfo file 'foot' would collide with the executable 'foot', all terminfo stuff has been moved into a subdirectory. --- meson.build | 11 ++--------- foot.info => terminfo/foot.info | 0 terminfo/meson.build | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 9 deletions(-) rename foot.info => terminfo/foot.info (100%) create mode 100644 terminfo/meson.build diff --git a/meson.build b/meson.build index f68546de..e59af49c 100644 --- a/meson.build +++ b/meson.build @@ -151,17 +151,10 @@ executable( 'log.c', 'log.h', version, install: true) -custom_target( - 'terminfo', - output: 'f', - input: 'foot.info', - command: ['tic', '-x', '-o', '@OUTDIR@', '-e', 'foot,foot-direct', '@INPUT@'], - install: true, - install_dir: join_paths(get_option('datadir'), 'terminfo')) - install_data('foot.desktop', 'foot-server.desktop', install_dir: join_paths(get_option('datadir'), 'applications')) -install_data('footrc', install_dir: join_paths(get_option('datadir'), 'foot')) +install_data('footrc') +subdir('terminfo') subdir('completions') subdir('doc') diff --git a/foot.info b/terminfo/foot.info similarity index 100% rename from foot.info rename to terminfo/foot.info diff --git a/terminfo/meson.build b/terminfo/meson.build new file mode 100644 index 00000000..129b72ee --- /dev/null +++ b/terminfo/meson.build @@ -0,0 +1,19 @@ +tic = find_program('tic', native: true) + +tic_generated = custom_target( + 'terminfo', + output: 'f', + input: 'foot.info', + command: [tic, '-x', '-o', '@OUTDIR@', '-e', 'foot,foot-direct', '@INPUT@'], + install: false, + install_dir: join_paths(get_option('datadir'), 'terminfo')) + +foreach terminfo : ['foot', 'foot-direct'] + custom_target( + 'terminfo-@0@'.format(terminfo), + output: terminfo, + input: tic_generated, + command: ['cp', join_paths('@INPUT@', terminfo), '@OUTPUT@'], + install: true, + install_dir: join_paths(get_option('datadir'), 'terminfo', 'f')) +endforeach