]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Refactor --makefile-name option.
authorBruno Haible <bruno@clisp.org>
Fri, 5 Aug 2022 23:47:34 +0000 (01:47 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 5 Aug 2022 23:51:59 +0000 (01:51 +0200)
* gnulib-tool.py (main): Handle option --makefile-name like all other
string-valued options.

ChangeLog
gnulib-tool.py

index 652600a45a26f305949752c04bbb3002cff7a6ac..d98a5bd69203131d0cb68b110d7ad28bbb58ea65 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2022-08-05  Bruno Haible  <bruno@clisp.org>
 
+       gnulib-tool.py: Refactor --makefile-name option.
+       * gnulib-tool.py (main): Handle option --makefile-name like all other
+       string-valued options.
+
        gnulib-tool.py: Implement option --no-libtool.
        * gnulib-tool.py (main): Accept option --no-libtool.
 
index f11c7bd5cb0e246d2a454aa50b581b1c1874dc28..ba15ba7154377429f86d309d711a0c5b2b1fe73d 100755 (executable)
@@ -314,9 +314,9 @@ def main():
                         action='store_true')
     # avoids
     parser.add_argument('--avoid',
-                        action='append',
                         dest='avoids',
                         default=None,
+                        action='append',
                         nargs=1)
     # libtool
     parser.add_argument('--libtool',
@@ -370,10 +370,10 @@ def main():
                         choices=['2', '3orGPLv2', '3'],
                         nargs='?')
     # makefile-name
-    parser.add_argument("--makefile-name",
-                        dest="makefile_name",
+    parser.add_argument('--makefile-name',
+                        dest='makefile_name',
                         default=None,
-                        type=str)
+                        nargs=1)
     # single-configure
     parser.add_argument('--single-configure',
                         dest='single_configure',
@@ -634,6 +634,8 @@ def main():
             lgpl = True
     libtool = cmdargs.libtool
     makefile_name = cmdargs.makefile_name
+    if makefile_name != None:
+        makefile_name = makefile_name[0]
     avoids = cmdargs.avoids
     if avoids != None:
         avoids = [ module