qemu/pc-bios/keymaps/meson.build
Steve Sistare adf4c9bd2e meson: fix dependency on qemu-keymap
When qemu-keymap is not available on the host, and enable-xkbcommon
is specified, parallel make fails with:

  % make clean
  ...
  % make -j 32
  ...
  FAILED: pc-bios/keymaps/is
  ./qemu-keymap -f pc-bios/keymaps/is -l is
  /bin/sh: ./qemu-keymap: No such file or directory
  ... many similar messages ...

The code always runs find_program, rather than waiting to build
qemu-keymap, because it looks for CONFIG_XKBCOMMON in config_host
rather than config_host_data.  Making serially succeeds, by soft
linking files from pc-bios/keymaps, but that is not the desired
result for enable-xkbcommon.

Examining all occurrences of 'in config_host' for similar bugs shows one
instance in the docs, which is also fixed here.

Fixes: 4113f4cfee ("meson: move xkbcommon to meson")

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1675708442-74966-1-git-send-email-steven.sistare@oracle.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-02-27 09:15:39 +01:00

60 lines
1.4 KiB
Meson

keymaps = {
'ar': '-l ar',
'bepo': '-l fr -v dvorak',
'cz': '-l cz',
'da': '-l dk',
'de': '-l de -v nodeadkeys',
'de-ch': '-l ch',
'en-gb': '-l gb',
'en-us': '-l us',
'es': '-l es',
'et': '-l et',
'fi': '-l fi',
'fo': '-l fo',
'fr': '-l fr -v nodeadkeys',
'fr-be': '-l be',
'fr-ca': '-l ca -v fr',
'fr-ch': '-l ch -v fr',
'hr': '-l hr',
'hu': '-l hu',
'is': '-l is',
'it': '-l it',
'ja': '-l jp -m jp106',
'lt': '-l lt',
'lv': '-l lv',
'mk': '-l mk',
'nl': '-l nl',
'no': '-l no',
'pl': '-l pl',
'pt': '-l pt',
'pt-br': '-l br',
'ru': '-l ru',
'th': '-l th',
'tr': '-l tr',
}
if meson.is_cross_build() or not xkbcommon.found()
native_qemu_keymap = find_program('qemu-keymap', required: false, disabler: true)
else
native_qemu_keymap = qemu_keymap
endif
if native_qemu_keymap.found()
t = []
foreach km, args: keymaps
# generate with qemu-kvm
t += custom_target(km,
build_by_default: true,
output: km,
command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
install: true,
install_dir: qemu_datadir / 'keymaps')
endforeach
alias_target('update-keymaps', t)
else
install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps')
endif
install_data(['sl', 'sv'], install_dir: qemu_datadir / 'keymaps')