diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-05-21 18:21:23 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-05-21 18:21:23 +0300 |
commit | dc148e0702dc47197f36a843b499d3d513faf272 (patch) | |
tree | 4e5bf878799a9c9826896cb8723d4b3822fd4eee /mesonbuild/modules | |
parent | 12a4e7d7e74e9d8b39a0509984910caa79a45e12 (diff) | |
download | meson-dc148e0702dc47197f36a843b499d3d513faf272.zip meson-dc148e0702dc47197f36a843b499d3d513faf272.tar.gz meson-dc148e0702dc47197f36a843b499d3d513faf272.tar.bz2 |
Remove all special casing for gettext and use elementary operations instead.
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r-- | mesonbuild/modules/i18n.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index 1467e7d..51668cb 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -13,6 +13,7 @@ # limitations under the License. from .. import coredata, mesonlib, build +import sys class I18nModule: @@ -23,7 +24,21 @@ class I18nModule: languages = mesonlib.stringlistify(kwargs.get('languages', [])) if len(languages) == 0: raise coredata.MesonException('List of languages empty.') - return build.PoInfo(packagename, languages, state.subdir) + potargs = [state.environment.get_build_command(), '--internal', 'gettext', 'pot', packagename] + 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) + installcmd = [sys.executable, + state.environment.get_build_command(), + '--internal', + 'gettext', + 'install', + state.subdir, + packagename, + state.environment.coredata.get_builtin_option('localedir'), + ] + languages + iscript = build.InstallScript(installcmd) + return [pottarget, gmotarget, iscript] def initialize(): return I18nModule() |