aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2019-03-25 14:55:31 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2019-03-28 23:22:23 +0200
commit4f9ecbee09a35f13b0dd5a3f9cb4630ec34f5131 (patch)
tree444c8addea113bdcac78e4a61c2349026f4adc2b /mesonbuild/scripts
parent0ad56708955eaef47fcf854bbb00e9a0e54536c0 (diff)
downloadmeson-4f9ecbee09a35f13b0dd5a3f9cb4630ec34f5131.zip
meson-4f9ecbee09a35f13b0dd5a3f9cb4630ec34f5131.tar.gz
meson-4f9ecbee09a35f13b0dd5a3f9cb4630ec34f5131.tar.bz2
gettext: prefer POTFILES.in if it exists
If POTFILES.in exists, then it will have come from autotools, in which case it is explicitly the file passed to xgettext -f, and the POTFILES file itself is generated by autotools as a proxy file which eventually gets inlined into the final Makefile as a variable "POTFILES = ......" In this case, attempting to use POTFILES as the input file will simply result in syntax errors and the inability to find files with a literal trailing " \" in the name. Usually POTFILES will not exist at all, and we would fallback on POTFILES.in, but if the source tree happens to be dirty, this would result in errors. Since it's never going to be right to use it, we can just do the right thing from the start and carry on.
Diffstat (limited to 'mesonbuild/scripts')
-rw-r--r--mesonbuild/scripts/gettext.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/scripts/gettext.py b/mesonbuild/scripts/gettext.py
index 593247a..f5c0421 100644
--- a/mesonbuild/scripts/gettext.py
+++ b/mesonbuild/scripts/gettext.py
@@ -44,9 +44,9 @@ def read_linguas(src_sub):
return []
def run_potgen(src_sub, pkgname, datadirs, args):
- listfile = os.path.join(src_sub, 'POTFILES')
+ listfile = os.path.join(src_sub, 'POTFILES.in')
if not os.path.exists(listfile):
- listfile = os.path.join(src_sub, 'POTFILES.in')
+ listfile = os.path.join(src_sub, 'POTFILES')
if not os.path.exists(listfile):
print('Could not find file POTFILES in %s' % src_sub)
return 1