summaryrefslogtreecommitdiff
path: root/gnulib-tool.py
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-08-06 03:06:51 +0200
committerBruno Haible <bruno@clisp.org>2022-08-06 03:06:51 +0200
commitb5850cf209fc597150fb196067674c8c41857316 (patch)
treec95910ff4d5bacddca77cc8f4432810c9c2d4a7f /gnulib-tool.py
parentbfc5329c890031833022bc78b5f0e793a53f5be6 (diff)
downloadgnulib-b5850cf209fc597150fb196067674c8c41857316.tar.gz
gnulib-tool.py: Finish implementing option --po-domain.
* gnulib-tool.py (main): Accept option --po-domain. * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix variable reference. * pygnulib/GLImport.py (GLImport.execute): Don't delete Makefile.in.in from the gnulib directory. Don't require a shell when invoking wget. After invoking wget, restore the current directory.
Diffstat (limited to 'gnulib-tool.py')
-rwxr-xr-xgnulib-tool.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/gnulib-tool.py b/gnulib-tool.py
index 030e3caf73..8dbf2d06a8 100755
--- a/gnulib-tool.py
+++ b/gnulib-tool.py
@@ -379,6 +379,11 @@ def main():
dest='macro_prefix',
default=None,
nargs=1)
+ # po-domain
+ parser.add_argument('--po-domain',
+ dest='podomain',
+ default=None,
+ nargs=1)
# single-configure
parser.add_argument('--single-configure',
dest='single_configure',
@@ -565,13 +570,23 @@ def main():
or cmdargs.excl_unportable_tests != None
or cmdargs.avoids != None or cmdargs.lgpl != None
or cmdargs.makefile_name != None
- or cmdargs.macro_prefix != None))):
+ or cmdargs.macro_prefix != None or cmdargs.podomain != None))):
message = '%s: *** ' % constants.APP['name']
message += 'invalid options for --%s mode\n' % mode
message += 'Try \'gnulib-tool --help\' for more information.\n'
message += '%s: *** Stop.\n' % constants.APP['name']
sys.stderr.write(message)
sys.exit(1)
+ if cmdargs.pobase != None and cmdargs.podomain == None:
+ message = '%s: *** ' % constants.APP['name']
+ message += 'together with --po-base, you need to specify --po-domain\n'
+ message += 'Try \'gnulib-tool --help\' for more information.\n'
+ message += '%s: *** Stop.\n' % constants.APP['name']
+ sys.stderr.write(message)
+ sys.exit(1)
+ if cmdargs.pobase == None and cmdargs.podomain != None:
+ message = '%s: warning: --po-domain has no effect without a --po-base option\n' % constants.APP['name']
+ sys.stderr.write(message)
# Determine specific settings.
destdir = cmdargs.destdir
@@ -645,6 +660,9 @@ def main():
macro_prefix = cmdargs.macro_prefix
if macro_prefix != None:
macro_prefix = macro_prefix[0]
+ podomain = cmdargs.podomain
+ if podomain != None:
+ podomain = podomain[0]
avoids = cmdargs.avoids
if avoids != None:
avoids = [ module