aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-05-26 21:58:34 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-05-26 21:58:34 +0300
commitc320b08ffbcc4a96f99022a93206437bb9681001 (patch)
treebdabda7d39733ab0bb370e17d48db699fc7d33c8
parent6f3a18a8613e566f4badaa027e8722dfc41cc3e5 (diff)
parent3b3c05f6b1c88d202b2166dca4b8e2937feebf27 (diff)
downloadmeson-c320b08ffbcc4a96f99022a93206437bb9681001.zip
meson-c320b08ffbcc4a96f99022a93206437bb9681001.tar.gz
meson-c320b08ffbcc4a96f99022a93206437bb9681001.tar.bz2
Merge gettextarg branch.
-rw-r--r--mesonbuild/interpreter.py1
-rw-r--r--mesonbuild/modules/i18n.py3
-rw-r--r--mesonbuild/scripts/gettext.py6
3 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index f269c2f..bf11439 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1052,7 +1052,6 @@ class Interpreter():
raise InterpreterException('Tried to create target %s which already exists.' % v.name)
self.build.targets[v.name] = v
elif isinstance(v, build.InstallScript):
- print('x')
self.build.install_scripts.append(v)
elif isinstance(v, build.Data):
self.build.data.append(v)
diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py
index 51668cb..4b529c7 100644
--- a/mesonbuild/modules/i18n.py
+++ b/mesonbuild/modules/i18n.py
@@ -24,7 +24,8 @@ class I18nModule:
languages = mesonlib.stringlistify(kwargs.get('languages', []))
if len(languages) == 0:
raise coredata.MesonException('List of languages empty.')
- potargs = [state.environment.get_build_command(), '--internal', 'gettext', 'pot', packagename]
+ extra_args = mesonlib.stringlistify(kwargs.get('args', []))
+ potargs = [state.environment.get_build_command(), '--internal', 'gettext', 'pot', packagename] + extra_args
pottarget = build.RunTarget(packagename + '-pot', sys.executable, potargs, state.subdir)
gmoargs = [state.environment.get_build_command(), '--internal', 'gettext', 'gen_gmo'] + languages
gmotarget = build.RunTarget(packagename + '-gmo', sys.executable, gmoargs, state.subdir)
diff --git a/mesonbuild/scripts/gettext.py b/mesonbuild/scripts/gettext.py
index adc4483..d8b2a9c 100644
--- a/mesonbuild/scripts/gettext.py
+++ b/mesonbuild/scripts/gettext.py
@@ -16,11 +16,11 @@
import os, subprocess, shutil
-def run_potgen(src_sub, pkgname, langs):
+def run_potgen(src_sub, pkgname, args):
listfile = os.path.join(src_sub, 'POTFILES')
ofile = os.path.join(src_sub, pkgname + '.pot')
- return subprocess.call(['xgettext', '--package-name=' + pkgname, '-p', src_sub, listfile,
- '-D', os.environ['MESON_SOURCE_ROOT'], '-k_', '-o', ofile])
+ return subprocess.call(['xgettext', '--package-name=' + pkgname, '-p', src_sub, '-f', listfile,
+ '-D', os.environ['MESON_SOURCE_ROOT'], '-k_', '-o', ofile] + args)
def gen_gmo(src_sub, bld_sub, langs):
for l in langs: