aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/i18n.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-05-07 23:03:01 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-05-29 18:23:03 -0400
commit34da721ec2ad96d35a829f5e977ec253e82b9d91 (patch)
tree7b7d9aa58f51170d3fc6bebb3389c529db1e55dc /mesonbuild/modules/i18n.py
parent6757e4f07c9f780ed33b21ac15f5f5727a6a10f3 (diff)
downloadmeson-34da721ec2ad96d35a829f5e977ec253e82b9d91.zip
meson-34da721ec2ad96d35a829f5e977ec253e82b9d91.tar.gz
meson-34da721ec2ad96d35a829f5e977ec253e82b9d91.tar.bz2
gettext: explicitly pass source root / subdir as cli args
Because this is a wrapper script and we could/should do this, we even have half the infra for it.
Diffstat (limited to 'mesonbuild/modules/i18n.py')
-rw-r--r--mesonbuild/modules/i18n.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py
index 2bdf9d3..4bbc69a 100644
--- a/mesonbuild/modules/i18n.py
+++ b/mesonbuild/modules/i18n.py
@@ -251,6 +251,9 @@ class I18nModule(ExtensionModule):
extra_arg = '--extra-args=' + '@@'.join(extra_args) if extra_args else None
potargs = state.environment.get_build_command() + ['--internal', 'gettext', 'pot', pkg_arg]
+ potargs.append(f'--source-root={state.source_root}')
+ if state.subdir:
+ potargs.append(f'--subdir={state.subdir}')
if datadirs:
potargs.append(datadirs)
if extra_arg:
@@ -292,6 +295,9 @@ class I18nModule(ExtensionModule):
targets.append(allgmotarget)
updatepoargs = state.environment.get_build_command() + ['--internal', 'gettext', 'update_po', pkg_arg]
+ updatepoargs.append(f'--source-root={state.source_root}')
+ if state.subdir:
+ updatepoargs.append(f'--subdir={state.subdir}')
if lang_arg:
updatepoargs.append(lang_arg)
if datadirs: