diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-09-12 00:30:21 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-09-12 00:30:21 +0300 |
commit | 3c3e580aead98389ecb42fdd297d78c6738aedb3 (patch) | |
tree | 2107781cec11657d4d7c2f335f51422ca0b24797 /backends.py | |
parent | 7006c6aa2c77927ed693e1443c458b29bb197683 (diff) | |
download | meson-3c3e580aead98389ecb42fdd297d78c6738aedb3.zip meson-3c3e580aead98389ecb42fdd297d78c6738aedb3.tar.gz meson-3c3e580aead98389ecb42fdd297d78c6738aedb3.tar.bz2 |
Parse gettext command and generate rule.
Diffstat (limited to 'backends.py')
-rw-r--r-- | backends.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/backends.py b/backends.py index 4957178..fe92a46 100644 --- a/backends.py +++ b/backends.py @@ -503,7 +503,17 @@ class NinjaBackend(Backend): ninja_quote(self.environment.get_build_dir())) outfile.write(" command = '%s' '%s' '%s' '%s' --backend ninja secret-handshake\n" % c) outfile.write(' description = Regenerating build files\n') - outfile.write(' generator = 1\n\n') + outfile.write(' generator = 1\n') + if len(self.build.pot) > 0: + self.generate_gettext_rules(outfile) + outfile.write('\n') + + def generate_gettext_rules(self, outfile): + rule = 'rule GEN_POT\n' + command = " command = xgettext -p '$OUTDIR' -D '%s' -k_ -o '$OUTFILE'\n" % \ + self.environment.get_source_dir() + outfile.write(rule) + outfile.write(command) def generate_static_link_rules(self, is_cross, outfile): if is_cross: |