From 522392e7553823e6b3ac38cadc4fbee72eae9540 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 4 Feb 2021 16:02:03 -0500 Subject: run_target: Add env kwarg Re-implement it in backend using the same code path as for custom_target(). This for example handle setting PATH on Windows when command is an executable. --- mesonbuild/modules/gnome.py | 8 ++++---- mesonbuild/modules/i18n.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'mesonbuild/modules') diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index f564eb4..48b80e0 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -907,8 +907,8 @@ class GnomeModule(ExtensionModule): '--id=' + project_id, '--sources=' + source_str, ] - pottarget = build.RunTarget('help-' + project_id + '-pot', potargs[0], - potargs[1:], [], state.subdir, state.subproject) + pottarget = build.RunTarget('help-' + project_id + '-pot', potargs, + [], state.subdir, state.subproject) poargs = state.environment.get_build_command() + [ '--internal', 'yelphelper', 'update-po', @@ -917,8 +917,8 @@ class GnomeModule(ExtensionModule): '--sources=' + source_str, '--langs=' + '@@'.join(langs), ] - potarget = build.RunTarget('help-' + project_id + '-update-po', poargs[0], - poargs[1:], [], state.subdir, state.subproject) + potarget = build.RunTarget('help-' + project_id + '-update-po', poargs, + [], state.subdir, state.subproject) rv = [inscript, pottarget, potarget] return ModuleReturnValue(None, rv) diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index ae24e6e..54faf4c 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -152,12 +152,12 @@ class I18nModule(ExtensionModule): potargs.append(datadirs) if extra_args: potargs.append(extra_args) - pottarget = build.RunTarget(packagename + '-pot', potargs[0], potargs[1:], [], state.subdir, state.subproject) + pottarget = build.RunTarget(packagename + '-pot', potargs, [], state.subdir, state.subproject) gmoargs = state.environment.get_build_command() + ['--internal', 'gettext', 'gen_gmo'] if lang_arg: gmoargs.append(lang_arg) - gmotarget = build.RunTarget(packagename + '-gmo', gmoargs[0], gmoargs[1:], [], state.subdir, state.subproject) + gmotarget = build.RunTarget(packagename + '-gmo', gmoargs, [], state.subdir, state.subproject) updatepoargs = state.environment.get_build_command() + ['--internal', 'gettext', 'update_po', pkg_arg] if lang_arg: @@ -166,7 +166,7 @@ class I18nModule(ExtensionModule): updatepoargs.append(datadirs) if extra_args: updatepoargs.append(extra_args) - updatepotarget = build.RunTarget(packagename + '-update-po', updatepoargs[0], updatepoargs[1:], [], state.subdir, state.subproject) + updatepotarget = build.RunTarget(packagename + '-update-po', updatepoargs, [], state.subdir, state.subproject) targets = [pottarget, gmotarget, updatepotarget] -- cgit v1.1