From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: gnulib-tool.py: Implement --no-libtool option correctly
Date: Fri, 12 Apr 2024 22:13:20 +0200 [thread overview]
Message-ID: <6887771.qr9KbqJxP1@nimes> (raw)
The unit test failure
$ ./test-cache-2-29.sh
Files ./test-cache-2-29.result/lib/Makefile.gnulib and tmp1966494-result/lib/Makefile.gnulib differ
Files ./test-cache-2-29.result/m4/gnulib-cache.m4 and tmp1966494-result/m4/gnulib-cache.m4 differ
Files ./test-cache-2-29.result/m4/gnulib-comp.m4 and tmp1966494-result/m4/gnulib-comp.m4 differ
Files ./test-cache-2-29.result/tests/Makefile.gnulib and tmp1966494-result/tests/Makefile.gnulib differ
FAIL: gnulib-tool's result has unexpected differences.
FAIL: test-cache-2-29.sh
$ diff -u test-cache-2-29.result/m4/gnulib-cache.m4 tmp1966494-result/m4/gnulib-cache.m4
--- test-cache-2-29.result/m4/gnulib-cache.m4 2024-04-12 13:43:37.960059958 +0200
+++ tmp1966494-result/m4/gnulib-cache.m4 2024-04-12 17:59:51.721942626 +0200
@@ -47,7 +47,7 @@
# --makefile-name=Makefile.gnulib \
# --automake-subdir \
# --no-conditional-dependencies \
-# --no-libtool \
+# --libtool \
# --macro-prefix=gl \
# --po-domain=prog \
# --witness-c-macro=IN_PROG \
@@ -77,6 +77,7 @@
gl_LGPL
gl_MAKEFILE_NAME([Makefile.gnulib])
gl_AUTOMAKE_SUBDIR
+gl_LIBTOOL
gl_MACRO_PREFIX([gl])
gl_PO_DOMAIN([prog])
gl_WITNESS_C_MACRO([IN_PROG])
is fixed by this patch:
2024-04-12 Bruno Haible <bruno@clisp.org>
gnulib-tool.py: Implement --no-libtool option correctly.
* pygnulib/GLConfig.py (GLConfig.default): For 'libtool', return None,
not False.
(GLConfig.checkLibtool): Update result type.
(resetLibtool): Reset to return None, not False.
* pygnulib/GLImport.py (GLImport.actioncmd): Update.
diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py
index 90b7bd984a..1ac40207a3 100644
--- a/pygnulib/GLConfig.py
+++ b/pygnulib/GLConfig.py
@@ -318,13 +318,13 @@ class GLConfig:
elif key in ['localpath', 'modules', 'avoids', 'tests',
'incl_test_categories', 'excl_test_categories']:
return []
- elif key in ['incobsolete', 'libtool', 'gnu_make',
+ elif key in ['incobsolete', 'gnu_make',
'automake_subdir', 'automake_subdir_tests', 'conddeps',
'libtests', 'dryrun']:
return False
elif key in ['copymode', 'lcopymode']:
return CopyAction.Copy
- elif key in ['lgpl', 'vc_files']:
+ elif key in ['lgpl', 'libtool', 'vc_files']:
return None
elif key == 'errors':
return True
@@ -788,7 +788,7 @@ class GLConfig:
self.table['libname'] = 'libgnu'
# Define libtool methods.
- def checkLibtool(self) -> bool:
+ def checkLibtool(self) -> bool | None:
'''Check if user enabled libtool rules.'''
return self.table['libtool']
@@ -802,7 +802,7 @@ class GLConfig:
def resetLibtool(self) -> None:
'''Reset libtool rules.'''
- self.table['libtool'] = False
+ self.table['libtool'] = None
# Define conddeps methods.
def checkCondDeps(self) -> bool:
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index 31380a0108..5f95706fc7 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -448,9 +448,9 @@ class GLImport:
actioncmd += ' \\\n# --conditional-dependencies'
else: # if not conddeps
actioncmd += ' \\\n# --no-conditional-dependencies'
- if libtool:
+ if libtool == True:
actioncmd += ' \\\n# --libtool'
- else: # if not libtool
+ else: # if libtool == False or libtool == None
actioncmd += ' \\\n# --no-libtool'
actioncmd += ' \\\n# --macro-prefix=%s' % macro_prefix
if podomain:
reply other threads:[~2024-04-12 20:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6887771.qr9KbqJxP1@nimes \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).