]> Savannah Git Hosting - gnulib.git/log
gnulib.git
13 months agognulib-tool.py: Fix incorrect assignment operator.
Collin Funk [Tue, 19 Mar 2024 19:25:37 +0000 (12:25 -0700)]
gnulib-tool.py: Fix incorrect assignment operator.

* pygnulib/GLImport.py (GLImport.actioncmd): Use '+=' instead of '=' to
append the string to the actioncmd instead of overwriting it.

13 months agognulib-tool: Make it work in the test suite.
Bruno Haible [Tue, 19 Mar 2024 23:27:27 +0000 (00:27 +0100)]
gnulib-tool: Make it work in the test suite.

* gnulib-tool.sh (gnulib_dir): Make absolute.
(func_create_megatestdir): If .git/refs/heads/master does not exist, use
ChangeLog instead.
* pygnulib/main.py (main): Make gnulib_dir absolute.
* pygnulib/GLTestDir.py (GLMegaTestDir.execute): If
.git/refs/heads/master does not exist, use ChangeLog instead.

13 months agognulib-tool.py: Make sure temporary files are removed.
Collin Funk [Tue, 19 Mar 2024 03:01:50 +0000 (20:01 -0700)]
gnulib-tool.py: Make sure temporary files are removed.

* pygnulib/GLImport.py (GLImport.execute): Fix nesting of statement so
that both temporary files are removed.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 67.
Collin Funk [Tue, 19 Mar 2024 02:58:37 +0000 (19:58 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 67.

Follow gnulib-tool change
2022-03-01  Paul Eggert  <eggert@cs.ucla.edu>
Create lib/Makefile.am after gnulib-comp.m4

* pygnulib/GLImport.py (GLImport.execute): Create library makefile after
creating gnulib-comp.m4.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 66.
Collin Funk [Mon, 18 Mar 2024 23:26:34 +0000 (16:26 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 66.

Follow gnulib-tool change
2021-12-25  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Fix handling of module libtextstyle-optional.

* pygnulib/GLModuleSystem.py (GLModule.repeatModuleInTests): New function.
* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Use it for creating
the tests/Makefile.am.
* pygnulib/GLTestDir.py (GLTestDir.execute): Use it when creating the
file list.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 65.
Collin Funk [Mon, 18 Mar 2024 19:23:46 +0000 (12:23 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 65.

Follow gnulib-tool change
2021-12-19  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Don't insist on ACLOCAL_AMFLAGS.

* pygnulib/GLImport.py (GLImport.execute): Don't add extra '-I' before
m4 directory in ACLOCAL_AMFLAGS. Prefer '0' instead of 'int()'. Mention
the use of AC_CONFIG_MACRO_DIRS in configure.ac as an alternative to
augmenting ACLOCAL_AMFLAGS.
* pygnulib/main.py (main): To find the m4 directories, look also for
AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS invocations in
configure.ac. Remove unnecessary call to 'joinpath' since it accepts a
variable length of arguments.

13 months agognulib-tool.py: Tweak last change.
Bruno Haible [Mon, 18 Mar 2024 11:02:01 +0000 (12:02 +0100)]
gnulib-tool.py: Tweak last change.

* pygnulib/GLModuleSystem.py (GLModule.isTests, GLModule.isNonTests):
Update comments.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 64.
Collin Funk [Mon, 18 Mar 2024 03:09:12 +0000 (20:09 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 64.

Follow gnulib-tool change
2021-12-25  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Respect applicability 'all' without --single-configure.

* pygnulib/GLModuleSystem.py (GLModule.isTests): Treat modules with
applicability 'all' like 'tests' modules, not like 'main' modules.
(GLModule.isNonTests): Treat all modules not ending in '-tests' as
non-test modules.
(GLModule.getApplicability): Don't use GLModule.isTests(). Because it
depends on the result of this function, using it would cause a
RecursionError exception.
(GLModule.getDependencies): Respect the difference between
module.isTests(), module.isNonTests(), and
module.getName().endswith('-tests').
(GLModule.getAutomakeSnippet_Unconditional, GLModule.getLicense)
(GLModuleTable.add_dummy): Likewise.
* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Likewise.

13 months agognulib-tool.py: Handle empty lists of lines consistently.
Bruno Haible [Sun, 17 Mar 2024 23:43:53 +0000 (00:43 +0100)]
gnulib-tool.py: Handle empty lists of lines consistently.

* pygnulib/constants.py (lines_to_multiline): New function.
(nlremove): Remove unused function.
* pygnulib/GLEmiter.py (_eliminate_NMD): Use lines_to_multiline instead
of the '\n'.join idiom.
(GLEmiter.autoconfSnippet, GLEmiter.autoconfSnippets,
GLEmiter.lib_Makefile_am): Likewise.
* pygnulib/GLImport.py (GLImport._update_ignorelist_, GLImport.execute):
Likewise.
* pygnulib/GLModuleSystem.py (GLModule.getDependenciesRecursively,
GLModule.getLinkDirectiveRecursively, GLModuleTable.remove_if_blocks):
Likewise.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
* pygnulib/main.py (main): Likewise.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 63.
Collin Funk [Sun, 17 Mar 2024 21:51:18 +0000 (14:51 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 63.

Follow gnulib-tool change
2020-12-28  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Fix logic whether to add a dummy.c.

* pygnulib/GLModuleSystem.py (GLModuleTable.remove_if_blocks): New
function.
(GLModuleTable.add_dummy): Use it to eliminate all conditional
statements from the automake snippet.

13 months agognulib-tool.py: Don't print extra newlines.
Collin Funk [Sun, 17 Mar 2024 18:53:11 +0000 (11:53 -0700)]
gnulib-tool.py: Don't print extra newlines.

* pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Don't print extra
newline that are not printed by gnulib-tool.sh.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 62.
Collin Funk [Sun, 17 Mar 2024 17:03:54 +0000 (10:03 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 62.

Follow gnulib-tool change
2020-02-22  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Ensure copied files are writable.

* pygnulib/constants.py (ensure_writable): New function. Make sure files
are writable.
(symlink_relative, hardlink): Use it.
* pygnulib/GLFileSystem.py (GLFileSystem.lookup)
(GLFileAssistant.add_or_update): Likewise.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
* pygnulib/main.py (main): Likewise.

13 months agognulib-tool: Add undocumented option --gnulib-dir.
Bruno Haible [Sun, 17 Mar 2024 12:46:04 +0000 (13:46 +0100)]
gnulib-tool: Add undocumented option --gnulib-dir.

* gnulib-tool.sh: Accept --gnulib-dir=... option.
* pygnulib/constants.py (init_DIRS): New function.
* pygnulib/main.py (main): Accept --gnulib-dir=... option. Invoke
init_DIRS. Expect .git directory to be present in DIRS['root'], not
APP['root'].
* pygnulib/GLImport.py (GLImport.execute): Use DIRS['root'], not
APP['root'].

13 months agognulib-tool.py: Follow gnulib-tool changes, part 61.
Collin Funk [Sun, 17 Mar 2024 02:56:42 +0000 (19:56 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 61.

Follow gnulib-tool change
2022-01-09  Bruno Haible  <bruno@clisp.org>
Remove influence of Automake conditionals on conditional dependencies.

* pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Don't
inhibit conditional dependencies processing on a module that uses an
Automake conditional.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 60.
Collin Funk [Sun, 17 Mar 2024 01:49:35 +0000 (18:49 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 60.

Follow gnulib-tool change
2019-11-18  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Fix build error on macOS with --conditional-dependencies.

* pygnulib/GLModuleSystem.py (GLModuleTable.add_dummy): Ignore modules
that are conditionally enabled.

13 months agognulib-tool.py: Don't try to remove files that don't exist.
Collin Funk [Sun, 17 Mar 2024 03:43:00 +0000 (20:43 -0700)]
gnulib-tool.py: Don't try to remove files that don't exist.

* pygnulib/GLFileSystem.py (GLFileSystem.add_or_update): Check if the
temporary file exists before trying to remove it.

13 months agorenameatu: support RENAME_EXCHANGE on macOS
Paul Eggert [Sun, 17 Mar 2024 05:27:48 +0000 (22:27 -0700)]
renameatu: support RENAME_EXCHANGE on macOS

* lib/renameatu.c (renameat2ish, renameatu) [RENAME_SWAP]:
Use macOS RENAME_SWAP to implement GNU/Linux RENAME_EXCHANGE.
* tests/test-renameatu.c (main): Add a test for RENAME_EXCHANGE.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 59.
Collin Funk [Sat, 16 Mar 2024 21:52:21 +0000 (14:52 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 59.

Follow gnulib-tool change
2017-10-29  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Avoid unnecessary config.h.in remaking in testdirs.

* pygnulib/GLTestDir.py (GLTestDir.execute): Touch the 'config.h.in'
file after executing 'autoheader' to update it's timestamps.

13 months agognulib-tool.py: Fix 'git update-index' call when using hard links.
Collin Funk [Sat, 16 Mar 2024 18:47:05 +0000 (11:47 -0700)]
gnulib-tool.py: Fix 'git update-index' call when using hard links.

* pygnulib/main.py: Fix conditional used to check whether 'git
update-index' should be called. Only catch FileNotFoundError exceptions
thrown when no 'git' program exists.

13 months agognulib-tool.py: Coding style: Avoid not().
Collin Funk [Sat, 16 Mar 2024 14:20:39 +0000 (07:20 -0700)]
gnulib-tool.py: Coding style: Avoid not().

* pygnulib/GLModuleSystem.py (isNonTests): Avoid not(). Write
'not condition' instead of 'not(condition)'.

13 months agognulib-tool.py: Coding style: Avoid bool().
Bruno Haible [Sat, 16 Mar 2024 13:19:06 +0000 (14:19 +0100)]
gnulib-tool.py: Coding style: Avoid bool().

* pygnulib/GLModuleSystem.py (GLModule): Write False instead of bool().

13 months agognulib-tool.py: Follow gnulib-tool changes, part 58.
Collin Funk [Sat, 16 Mar 2024 02:58:27 +0000 (19:58 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 58.

Follow gnulib-tool change
2017-05-21  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Add options to create hard links.

* pygnulib/GLConfig.py (GLConfig.__init__): Add 'copymode' and
'lcopymode' to the parameter list. Initialize them.
(GLConfig.default): Don't use symbolic or hard links by default.
(GLConfig.checkCopyMode, GLConfig.setCopyMode, GLConfig.resetCopyMode):
New functions to modify and check the method for copying non --local-dir
files.
(GLConfig.checkLCopyMode, GLConfig.setLCopyMode)
(GLConfig.resetLCopyMode): New functions to modify and check the method
for copying --local-dir files.
(GLConfig.checkSymbolic, GLConfig.resetSymbolic, GLConfig.setSymbolic)
(GLConfig.checkLSymbolic, GLConfig.resetLSymbolic)
(GLConfig.setLSymbolic): Remove unused functions. The functionality of
these are now implemented in the *CopyMode() and *LCopyMode() variants.
* pygnulib/GLFileSystem.py (CopyAction.Hardlink): New Enum value to
describe hard links.
(GLFileSystem.shouldLink): Check if hard links should be used.
(GLFileAssistant.add, GLFileAssistant.update): Try to hard link if
enabled. Copy the file if linking fails.
(GLFileAssistant.add_or_update): Remove temporary files unconditionally.
* pygnulib/GLInfo.py (GLInfo.usage): Document new options in the usage
message.
* pygnulib/GLTestDir.py (GLTestDir.execute): Try to hard link if
enabled. Copy the file if linking fails.
* pygnulib/classes.py: Importy the CopyAction Enum.
* pygnulib/constants.py (hardlink): New function based on
symlink_relative.
* pygnulib/main.py (main): Add new options --hardlink and
--local-hardlink. Invoke 'git update-index --refresh' to mitigate the
effects of the hard links on git.

13 months agognulib-tool.sh: Make --local-dir options in gnulib-cache.m4 look nicer.
Bruno Haible [Sat, 16 Mar 2024 11:38:35 +0000 (12:38 +0100)]
gnulib-tool.sh: Make --local-dir options in gnulib-cache.m4 look nicer.

* gnulib-tool.sh (func_import): Append the --local-dir=... options
through func_append_actionarg.

13 months agognulib-tool.py: Don't lose the gl_LGPL value from gnulib-cache.m4.
Bruno Haible [Sat, 16 Mar 2024 11:21:35 +0000 (12:21 +0100)]
gnulib-tool.py: Don't lose the gl_LGPL value from gnulib-cache.m4.

Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00152.html>.

* pygnulib/GLConfig.py (GLConfig.default): For the 'lgpl' property,
return None, not False.

13 months agognulib-tool.py: Don't lose the gl_LOCAL_DIR value from gnulib-cache.m4.
Bruno Haible [Sat, 16 Mar 2024 01:58:55 +0000 (02:58 +0100)]
gnulib-tool.py: Don't lose the gl_LOCAL_DIR value from gnulib-cache.m4.

Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00152.html>.

* pygnulib/GLConfig.py (GLConfig.default): For the 'localpath' property,
return [], not ''.

13 months agognulib-tool: Enhance last patch.
Bruno Haible [Fri, 15 Mar 2024 21:36:51 +0000 (22:36 +0100)]
gnulib-tool: Enhance last patch.

* gnulib-tool: If gnulib-tool.sh failed but gnulib-tool.py succeeded,
report that and don't erase the outputs and log files.

13 months agoautoupdate
Karl Berry [Fri, 15 Mar 2024 16:18:34 +0000 (09:18 -0700)]
autoupdate

13 months agognulib-tool.py: Follow gnulib-tool changes, part 57.
Collin Funk [Fri, 15 Mar 2024 01:41:05 +0000 (18:41 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 57.

Follow gnulib-tool change
2019-01-04  Bruno Haible  <bruno@clisp.org>
gnulib-tool: New option --extract-recursive-link-directive.

* pygnulib/GLModuleSystem.py (GLModule.getDependenciesRecursively): New
function. Implements the --extract-recursive-dependencies option.
(GLModule.getLinkDirectiveRecursively): New function. Implements the
--extract-recursive-link-directive.
* pygnulib/main.py (main): Add the --extract-recursive-dependencies and
--extract-recursive-link-directive options.
* pygnulib/GLInfo.py (GLInfo.usage): Add new options to help message.

13 months agognulib-tool: Obey environment variable GNULIB_TOOL_IMPL.
Bruno Haible [Thu, 14 Mar 2024 20:28:58 +0000 (21:28 +0100)]
gnulib-tool: Obey environment variable GNULIB_TOOL_IMPL.

* gnulib-tool.sh: Renamed from gnulib-tool.
* gnulib-tool: New file, based on gnulib-tool.sh.
* gnulib-tool.py: Check the Python version.

13 months agognulib-tool.py: Fix write failure due to bad sourcebase.
Collin Funk [Thu, 14 Mar 2024 02:21:44 +0000 (19:21 -0700)]
gnulib-tool.py: Fix write failure due to bad sourcebase.

* pygnulib/constants.py (cleaner): Only call strip() on string objects.
* pygnulib/main.py (main): Fix parsing of AMLOCAL_AMFLAGS from
Makefile.am. Add some comments from gnulib-tool.

13 months agosig2str tests: Refactor.
Bruno Haible [Thu, 14 Mar 2024 02:16:15 +0000 (03:16 +0100)]
sig2str tests: Refactor.

* tests/test-sig2str.c (test_sig2str, test_str2sig): New functions,
extracted from main.
(main): Invoke them.

13 months agosig2str: Add tests.
Collin Funk [Wed, 13 Mar 2024 19:17:41 +0000 (12:17 -0700)]
sig2str: Add tests.

* tests/test-sig2str.c: New file.
* modules/sig2str-tests: New file.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 56.
Collin Funk [Tue, 12 Mar 2024 20:01:50 +0000 (13:01 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 56.

Follow gnulib-tool change
2021-04-26  Paul Eggert  <eggert@cs.ucla.edu>
gnulib-tool: port better to current Autoconf

* pygnulib/GLImport.py (GLImport.execute): Remove exit() call before
printing reminders. Suggest replacing AC_PROG_CC_STDC and
AC_PROG_CC_C99, as per current Autoconf.

13 months agognulib-tool.py: Fix last commit.
Collin Funk [Tue, 12 Mar 2024 18:45:53 +0000 (11:45 -0700)]
gnulib-tool.py: Fix last commit.

* pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Silence Python
warnings about invalid escape. Make sure to escape the backslash
character we want to print.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 55.
Collin Funk [Tue, 12 Mar 2024 01:50:28 +0000 (18:50 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 55.

Follow gnulib-tool changes
2022-01-05  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Avoid known warnings that reflect Gnulib's coding style.
2022-01-08  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Remove all *.Po files upon distclean (regr. 2022-01-05).

* pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Collect the *.Po or
*.Plo files to remove into an AC_SUBSTed variable gl_LIBOBJDEPS. Use
Python f-strings instead of string replacements.
(GLEmiter.lib_Makefile_am): Add the GL_CFLAG_GNULIB_WARNINGS to the
CFLAGS of all the compilation units of the library. Extend the distclean
and maintainer-clean rules.
(GLEmiter.tests_Makefile_am): Add the GL_CFLAG_GNULIB_WARNINGS to the
CFLAGS.
* pygnulib/GLImport.py (GLImport.gnulib_comp): Emit an invocation of
gl_CC_GNULIB_WARNINGS.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 54.
Collin Funk [Mon, 11 Mar 2024 07:42:57 +0000 (00:42 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 54.

Follow gnulib-tool change
2021-12-24  Paul Eggert  <eggert@cs.ucla.edu>
maint: avoid empty lines in recipes

* pygnulib/GLEmiter.py (_eliminate_NMD_from_line): Eliminate occurrences
of @!NMD@ too. Document parameters in docstring.
(_eliminate_NMD): Update docstring to reflect changes. Document
parameters.

13 months agognulib-tool.py: Tweak last commit.
Bruno Haible [Mon, 11 Mar 2024 12:27:30 +0000 (13:27 +0100)]
gnulib-tool.py: Tweak last commit.

* pygnulib/GLEmiter.py (_eliminate_NMD): Don't add an extra newline when
the result should be empty.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 53.
Collin Funk [Mon, 11 Mar 2024 07:06:18 +0000 (00:06 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 53.

Follow gnulib-tool change
2021-12-21  Bruno Haible  <bruno@clisp.org>
Optimize redundant 'mkdir -p .' invocations.

* pygnulib/GLEmiter.py (_eliminate_NMD_from_line): New private function
to remove @NMD@ occurrences from the line of an Automake snippet.
(_eliminate_NMD): New private function which uses
_eliminate_NMD_from_line on each line of the Automake snippet.
(GLEmiter.lib_Makefile_am, GLEmiter.tests_Makefile_am): Use
_eliminate_NMD on the Automake snippet.

13 months agognulib-tool.py: Make some code more straightforward.
Bruno Haible [Mon, 11 Mar 2024 11:49:24 +0000 (12:49 +0100)]
gnulib-tool.py: Make some code more straightforward.

* pygnulib/GLImport.py (GLImport.__init__): Reorder assignments and
conditions slightly.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 52.
Collin Funk [Mon, 11 Mar 2024 04:50:59 +0000 (21:50 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 52.

Follow gnulib-tool change
2021-12-15  Bruno Haible  <bruno@clisp.org>
automake-subdir support: Look for 'subdir-objects' also in configure.ac.

* pygnulib/GLImport.py (GLImport.__init__): Check for 'subdir-objects'
in the AM_INIT_AUTOMAKE macro of configure.ac.

13 months agognulib-tool.py: Tweak last commit.
Bruno Haible [Sun, 10 Mar 2024 22:47:58 +0000 (23:47 +0100)]
gnulib-tool.py: Tweak last commit.

* pygnulib/GLEmiter.py (GLEmiter.initmacro_end): Avoid an implicit str
to bool conversion.
* pygnulib/GLImport.py (GLImport.__init__): Add a comment. Don't allow
a '|' in place of whitespace. Don't emit redundant gl_source_base
assignments.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 51.
Collin Funk [Sun, 10 Mar 2024 21:07:35 +0000 (14:07 -0700)]
gnulib-tool.py: Follow gnulib-tool changes, part 51.

Follow gnulib-tool change
2021-12-15  Bruno Haible  <bruno@clisp.org>
Accommodate non-recursive Automake in a less hacky way.

* pygnulib/GLConfig.py (GLConfig.__init__): Add 'automake_subdir' to the
parameter list.
(GLConfig.default): Set the default value of automake_subdir to a
boolean False.
(GLConfig.getAutomakeSubdir, GLConfig.setAutomakeSubdir)
(GLConfig.resetAutomakeSubdir): New functions to access and manipulate
the automake_subdir option.
* pygnulib/GLEmiter.py (GLEmiter.shellvars_init): New function.
(GLEmiter.initmacro_end): Add second parameter 'gentests'. Use it to prefix each
object file name in *_LIBOBJS and *_LTLIBOBJS.
* pygnulib/GLError.py (GLError.__init__, GLError.__repr__): Add new
error for if --automake-subdir is used without the 'subdir-objects'
Automake option.
* pygnulib/GLImport.py (GLImport.__init__): Check for 'subdir-objects'
in Makefile.am.
(GLImport.actioncmd): Emit --automake-subdir in actioncmd.
(GLImport.gnulib_cache): Add gl_AUTOMAKE_SUBDIR to gnulib-cache.m4 if
--automake-subdir is used.
(GLImport.gnulib_comp): Update calls to GLEmiter.initmacro_end. Call
GLEmiter.shellvars_init.
(GLImport.execute): Likewise. Use the build-aux/prefix-gnulib-mk script.
* pygnulib/GLInfo.py (GLInfo.usage): Add --automake-subdir to the usage
message.
* pygnulib/GLTestDir.py (GLTestDir.execute): Update calls to
GLEmiter.initmacro_end. Call GLEmiter.shellvars_init.
* pygnulib/main.py (main): Add support for --automake-subdir.

13 months agognulib-tool: Don't remove comments referencing @NMD@, part 2.
Collin Funk [Sun, 10 Mar 2024 09:02:30 +0000 (01:02 -0800)]
gnulib-tool: Don't remove comments referencing @NMD@, part 2.

* gnulib-tool (func_emit_tests_Makefile_am): Replace lines that start
with @NMD@ or @!NMD@ instead of lines that contain them.

13 months agognulib-tool.py: One more comment regarding coding style.
Bruno Haible [Sun, 10 Mar 2024 12:06:00 +0000 (13:06 +0100)]
gnulib-tool.py: One more comment regarding coding style.

* pygnulib/main.py: Add comment regarding conditional expressions.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 50.
Collin Funk [Sat, 9 Mar 2024 09:41:02 +0000 (01:41 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 50.

Follow gnulib-tool changes
2021-12-12  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Try to support non-recursive-gnulib-prefix-hack with tests.
2021-12-13  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Fix mistake in last commit.

* pygnulib/GLImport.py (GLImport.gnulib_comp): Expect the filetable as a
parameter instead of a list of all files. Add type checks. Invoke
AC_CONFIG_LIBOBJ_DIR based on the location of alloca.c.
(GLImport.execute): Adjust call to GLImport.gnulib_comp to reflect
parameter changes.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 49.
Collin Funk [Sat, 9 Mar 2024 06:30:03 +0000 (22:30 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 49.

Follow gnulib-tool change
2021-08-07  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Add support for Automake 1.16.4.

* pygnulib/GLTestDir.py (_patch_test_driver): If patching
build-aux/test-driver fails with build-aux/test-driver.diff try again
with build-aux/test-driver-1.16.3.diff.

13 months agounistr/u16-to-u32: Relicense under LGPLv2+.
Bruno Haible [Sat, 9 Mar 2024 12:30:32 +0000 (13:30 +0100)]
unistr/u16-to-u32: Relicense under LGPLv2+.

* modules/unistr/u16-to-u32 (License): Change to LGPLv2+.
* lib/unistr/u16-to-u32.c: Update license notice.

13 months agounistr/u16-mbtoucr: Relicense under LGPLv2+.
Bruno Haible [Sat, 9 Mar 2024 12:28:06 +0000 (13:28 +0100)]
unistr/u16-mbtoucr: Relicense under LGPLv2+.

* modules/unistr/u16-mbtoucr (License): Change to LGPLv2+.
* lib/unistr/u16-mbtoucr.c: Update license notice.

13 months agounistr/u16-strlen: Relicense under LGPLv2+.
Bruno Haible [Sat, 9 Mar 2024 12:23:47 +0000 (13:23 +0100)]
unistr/u16-strlen: Relicense under LGPLv2+.

* modules/unistr/u16-strlen (License): Change to LGPLv2+.
* lib/unistr/u16-strlen.c: Update license notice.

13 months agoparse-datetime: Simplify.
Bruno Haible [Sat, 9 Mar 2024 12:00:28 +0000 (13:00 +0100)]
parse-datetime: Simplify.

* modules/parse-datetime (Makefile.am): Don't generate
parse-datetime-gen.h.

13 months agoparse-datetime: Simplify.
Bruno Haible [Sat, 9 Mar 2024 11:45:06 +0000 (12:45 +0100)]
parse-datetime: Simplify.

* lib/parse-datetime.y (yyerror): Change return type to 'void'.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 48.
Collin Funk [Sat, 9 Mar 2024 04:59:16 +0000 (20:59 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 48.

Follow gnulib-tool change
2019-01-23  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Support running testdirs on Android.

* pygnulib/GLError.py (GLError.__init__, GLError.__repr__): Add errno 20
to print an error if patching build-aux/test-driver fails.
* pygnulib/main.py (main): Likewise.
* pygnulib/GLTestDir.py (_patch_test_driver): New private function which
runs patch on build-aux/test-driver with build-aux/test-driver.diff.
(GLTestDir.execute, GLMegaTestDir.execute): Check for
build-aux/test-driver in each testdir and patch it after running
automake.

13 months agognulib-tool: Don't remove comments referencing @NMD@.
Collin Funk [Fri, 8 Mar 2024 10:28:11 +0000 (02:28 -0800)]
gnulib-tool: Don't remove comments referencing @NMD@.

* gnulib-tool (func_emit_lib_Makefile_am): Replace lines that start with
@NMD@ or @!NMD@ instead of lines that contain them.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 47.
Collin Funk [Fri, 8 Mar 2024 09:43:26 +0000 (01:43 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 47.

Follow gnulib-tool changes
2021-12-15  Bruno Haible  <bruno@clisp.org>
Fix creation of build directories with non-recursive-gnulib-prefix-hack.
2021-12-18  Bruno Haible  <bruno@clisp.org>
Fix support for --gnu-make in tests (regression 2021-12-15).

* pygnulib/GLEmiter.py (_CONVERT_TO_GNU_MAKE): New variable which is a
list of tuples which are used with re.sub.
(_convert_to_gnu_make): New function which converts an input snippet
from Automake to GNU Make syntax using the regular expressions stored in
_CONVERT_TO_GNU_MAKE.
(GLEmiter.lib_Makefile_am): Use _convert_to_gnu_make. Replace '%reldir%'
tokens.
(GLEmiter.tests_Makefile_am): Likewise.

13 months agognulib-tool.py: Fix errors when executing --create-megatestdir.
Collin Funk [Thu, 7 Mar 2024 11:11:55 +0000 (03:11 -0800)]
gnulib-tool.py: Fix errors when executing --create-megatestdir.

* pygnulib/GLTestDir.py (GLMegaTestDir.execute): Create a testdir for
each module in its own subdirectory. Create a testdir with all modules
in 'ALL'. Add missing join call on str object. Don't emit 'configure.ac'
into 'Makefile.am'. Make sure commands are executed in the proper
directory.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 46.
Collin Funk [Thu, 7 Mar 2024 06:12:15 +0000 (22:12 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 46.

Follow gnulib-tool change
2022-02-22  Simon Josefsson  <simon@josefsson.org>
gnulib-tool: Bump automake dependency.

* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
(GLEmiter.tests_Makefile_am): Require Automake >= 1.14, for %reldir%
support.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 45.
Collin Funk [Thu, 7 Mar 2024 05:49:21 +0000 (21:49 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 45.

Follow gnulib-tool changes
2021-12-12  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Support different basenames for the lib/,tests/ Makefiles.
2022-01-08  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Fix "Don't forget" messages (regression 2021-12-12).

* pygnulib/GLConfig.py (GLConfig.__init__): Add 'tests_makefile_name'
argument.
(GLConfig.getMakefileName, GLConfig.setMakefileName)
(GLConfig.resetMakefileName): Remove references to tests Makefile.am in
doc strings.
(GLConfig.getTestsMakefileNamem, GLConfig.setTestsMakefileName)
(GLConfig.resetTestsMakefileName): New methods used to access value
passed with the '--tests-makefile-name' option.
* pygnulib/GLImport.py (GLImport.__init__): Check for
'gl_TESTS_MAKEFILE_NAME' in cache.
(GLImport.actioncmd): Output --tests-makefile-name when describing
gnulib-tool invocation.
(GLImport.gnulib_cache): Output 'gl_TESTS_MAKEFILE_NAME' to cache.
(GLImport.execute): Use two local variables, source_makefile_am and
tests_makefile_am, which are passed to gnulib-tool.py or given default
values.
* pygnulib/GLInfo.py (GLInfo.usage): Add '--tests-makefile-name' to
usage message.
* pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Reduce code
duplication by expecting Makefile names passed as arguments.
* pygnulib/main.py (main): Add support for '--tests-makefile-name'.

13 months agognulib-tool: Search for a working 'join' program.
Bruno Haible [Wed, 6 Mar 2024 16:06:59 +0000 (17:06 +0100)]
gnulib-tool: Search for a working 'join' program.

Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00044.html>.

* gnulib-tool (JOIN): New variable. Use it everywhere instead of 'join'.

13 months agoc-strtof, c-strtod, c-strtold: Comment.
Bruno Haible [Wed, 6 Mar 2024 12:45:35 +0000 (13:45 +0100)]
c-strtof, c-strtod, c-strtold: Comment.

* lib/c-strtod.c: Mention me as co-author.

13 months agognulib-tool.py: Fix value of LDADD for libtests.
Collin Funk [Wed, 6 Mar 2024 10:44:39 +0000 (02:44 -0800)]
gnulib-tool.py: Fix value of LDADD for libtests.

* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Fix value of LDADD
to match gnulib-tool.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 44.
Collin Funk [Wed, 6 Mar 2024 08:09:20 +0000 (00:09 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 44.

Follow gnulib-tool changes
2021-06-10  Bruno Haible  <bruno@clisp.org>
Clarify where to report test failures from Gnulib tests.
2021-06-11  Bruno Haible  <bruno@clisp.org>
Make message in last commit more precise.

* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Emit a dependency
of 'check-am' on 'check-notice' that prints a notice describing where to
report test failures.

13 months agognulib-tool.py: Tweak comment location.
Bruno Haible [Wed, 6 Mar 2024 10:59:11 +0000 (11:59 +0100)]
gnulib-tool.py: Tweak comment location.

* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Move a comment.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 43.
Collin Funk [Wed, 6 Mar 2024 07:47:08 +0000 (23:47 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 43.

Follow gnulib-tool change
2021-06-10  Bruno Haible  <bruno@clisp.org>
Clarify that compiler warnings in the Gnulib tests can be ignored.

* pygnulib/GLEmiter.py (GLEmiter.initmacro_start): Add boolean argument
to control whether gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS should
be required.
(GLEmiter.tests_Makefile_am): Emit overrides for CFLAGS and CXXFLAGS.
Emit a dependency of 'all' on 'all-notice' that prints a warning that
compiler warnings can be ignored for tests.
* pygnulib/GLImport.py (GLImport.gnulib_comp): Add boolean argument to
tell whether a tests Makefile.am is being emitted. Update calls to
GLEmiter.initmacro_start.
(GLImport.execute): Update calls to GLEmiter.initmacro_start.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.

13 months agognulib-tool.py: Fix gnulib-cache.m4 output.
Collin Funk [Wed, 6 Mar 2024 04:44:17 +0000 (20:44 -0800)]
gnulib-tool.py: Fix gnulib-cache.m4 output.

* pygnulib/GLImport.py (GLImport.gnulib_cache): Don't emit an extra '#'
to start the actioncmd comment.

13 months agognulib-tool.py: Tweak comment.
Bruno Haible [Wed, 6 Mar 2024 10:34:36 +0000 (11:34 +0100)]
gnulib-tool.py: Tweak comment.

* pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Tweak 'gentests'
description.

13 months agognulib-tool.py: Follow gnulib-tool changes, part 42.
Collin Funk [Wed, 6 Mar 2024 04:32:29 +0000 (20:32 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 42.

Follow gnulib-tool change
2019-02-15  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Support --import with just a few tests, not --with-tests.

* pygnulib/GLImport.py (GLImport.execute): Use 'gentests' instead of
'inctests' when generating files.
* pygnulib/GLMakefileTable.py (GLMakefileTable.parent): Add 'gentests'
argument and use it instead of 'inctests'.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 41.
Collin Funk [Wed, 6 Mar 2024 00:30:20 +0000 (16:30 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 41.

Follow gnulib-tool change
2018-09-03  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Fix build order when $testsbase is a subdir of $sourcebase.

* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Consider the dotfirst
flag.
(GLEmiter.tests_Makefile_am): Don't consider the dotfirst flag.
* pygnulib/GLImport.py (GLImport.execute): Set the dotfirst for tests.
* pygnulib/GLMakefileTable.py (GLMakefileTable.editor): Add optional
dotfirst flag to fix build order when $testsbase is a subdir of
$sourcebase.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 40.
Collin Funk [Tue, 5 Mar 2024 05:26:08 +0000 (21:26 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 40.

Follow gnulib-tool change
2021-12-18  Bruno Haible  <bruno@clisp.org>
stdint: Fix handling of limits.h (regression 2021-12-16).

* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
(GLEmiter.tests_Makefile_am): If --gnu-make is used, assume that
AC_SUBSTed variables for conditionals are constructed by appending the
suffix '_CONDITION'.

14 months agognulib-tool.py: Fix incorrect tests Makefile.am generation.
Collin Funk [Tue, 5 Mar 2024 10:11:51 +0000 (02:11 -0800)]
gnulib-tool.py: Fix incorrect tests Makefile.am generation.

* pygnulib/GLImport.py: Call GLEmiter.tests_Makefile_am instead of
GLEmiter.lib_Makefile_am when creating the tests Makefile. Replace
incorrect actioncmd argument with witness_macro.

14 months agodoc: Update info about fopencookie.
Bruno Haible [Tue, 5 Mar 2024 18:11:09 +0000 (19:11 +0100)]
doc: Update info about fopencookie.

Reported by Michael Ford <fanquake@gmail.com>.

* doc/glibc-functions/fopencookie.texi: Update platforms list.

14 months agodoc: Fix a typo.
Bruno Haible [Tue, 5 Mar 2024 17:59:33 +0000 (18:59 +0100)]
doc: Fix a typo.

Reported by Tim Rice in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00023.html>.

* doc/build-automation.texi (Building gnulib): Fix typo.

14 months agoc-strtof, c-strtod, c-strtold: Make multithread-safe.
Bruno Haible [Tue, 5 Mar 2024 16:10:38 +0000 (17:10 +0100)]
c-strtof, c-strtod, c-strtold: Make multithread-safe.

* lib/c-strtod.c: Include <langinfo.h>, c-ctype.h.
(decimal_point_char): New function, copied from lib/vasnprintf.c.
(C_STRTOD): On platforms that don't have STRTOD_L nor a working
uselocale(), pre-parse the number and call STRTOD after having replaced
the '.' with the locale-dependent decimal point character.
* m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOF, gl_C_STRTOLD): Test for
nl_langinfo().
* modules/c-strtof (Depends-on): Add c-ctype. Remove strdup-posix.
* modules/c-strtod (Depends-on): Likewise.
* modules/c-strtold (Depends-on): Likewise.

14 months agoc-strtold: Add multithread-safety test.
Bruno Haible [Tue, 5 Mar 2024 12:44:13 +0000 (13:44 +0100)]
c-strtold: Add multithread-safety test.

* tests/test-c-strtold-mt.c: New file.
* tests/test-c-strtold-mt.sh: New file, based on
tests/test-c-strtold1.sh.
* modules/c-strtold-tests (Files): Add them.
(Depends-on): Add thread, nanosleep.
(Makefile.am): Arrange to build test-c-strtold-mt and run
test-c-strtold-mt.sh.

14 months agoc-strtod: Add multithread-safety test.
Bruno Haible [Tue, 5 Mar 2024 12:35:08 +0000 (13:35 +0100)]
c-strtod: Add multithread-safety test.

* tests/test-c-strtod-mt.c: New file.
* tests/test-c-strtod-mt.sh: New file, based on tests/test-c-strtod1.sh.
* modules/c-strtod-tests (Files): Add them.
(Depends-on): Add thread, nanosleep.
(Makefile.am): Arrange to build test-c-strtod-mt and run
test-c-strtod-mt.sh.

14 months agoc-strtof: Add multithread-safety test.
Bruno Haible [Tue, 5 Mar 2024 12:42:27 +0000 (13:42 +0100)]
c-strtof: Add multithread-safety test.

* tests/test-c-strtof-mt.c: New file.
* tests/test-c-strtof-mt.sh: New file, based on tests/test-c-strtof1.sh.
* modules/c-strtof-tests (Files): Add them.
(Depends-on): Add thread, nanosleep.
(Makefile.am): Arrange to build test-c-strtof-mt and run
test-c-strtof-mt.sh.

14 months agolocale-*.m4: Update comments.
Bruno Haible [Tue, 5 Mar 2024 11:56:17 +0000 (12:56 +0100)]
locale-*.m4: Update comments.

* m4/locale-ar.m4: Update comments for Solaris 10.
* m4/locale-fr.m4: Likewise.
* m4/locale-ja.m4: Likewise.
* m4/locale-tr.m4: Likewise.

14 months agoc-strtold: Add tests.
Bruno Haible [Tue, 5 Mar 2024 11:21:36 +0000 (12:21 +0100)]
c-strtold: Add tests.

* tests/test-strtold.h: New file, extracted from tests/test-strtold.c.
* tests/test-strtold.c: Include test-strtold.h.
(FABSL): Remove unused macro.
(main): Just invoke test_function.
* tests/test-strtold1.c: Add comment.
* modules/strtold-tests (Files): Add tests/test-strtold.h.
* tests/test-c-strtold.c: New file, based on tests/test-strtold.c.
* tests/test-c-strtold1.c: New file, based on tests/test-strtold1.c.
* tests/test-c-strtold1.sh: New file, based on tests/test-strtold1.sh.
* modules/c-strtold-tests: New file, based on modules/strtold-tests.

14 months agoc-strtod: Add tests.
Bruno Haible [Tue, 5 Mar 2024 11:19:29 +0000 (12:19 +0100)]
c-strtod: Add tests.

* tests/test-strtod.h: New file, extracted from tests/test-strtod.c.
* tests/test-strtod.c: Include test-strtod.h.
(FABS): Remove unused macro.
(main): Just invoke test_function.
* tests/test-strtod1.c: Add comment.
* modules/strtod-tests (Files): Add tests/test-strtod.h.
* tests/test-c-strtod.c: New file, based on tests/test-strtod.c.
* tests/test-c-strtod1.c: New file, based on tests/test-strtod1.c.
* tests/test-c-strtod1.sh: New file, based on tests/test-strtod1.sh.
* modules/c-strtod-tests: New file, based on modules/strtod-tests.

14 months agoc-strtof: Add tests.
Bruno Haible [Tue, 5 Mar 2024 11:18:01 +0000 (12:18 +0100)]
c-strtof: Add tests.

* tests/test-strtof.h: New file, extracted from tests/test-strtof.c.
* tests/test-strtof.c: Include test-strtof.h.
(FABS): Remove unused macro.
(main): Just invoke test_function.
* tests/test-strtof1.c: Add comment.
* modules/strtof-tests (Files): Add tests/test-strtof.h.
* tests/test-c-strtof.c: New file, based on tests/test-strtof.c.
* tests/test-c-strtof1.c: New file, based on tests/test-strtof1.c.
* tests/test-c-strtof1.sh: New file, based on tests/test-strtof1.sh.
* modules/c-strtof-tests: New file, based on modules/strtof-tests.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 39.
Collin Funk [Mon, 4 Mar 2024 20:35:15 +0000 (12:35 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 39.

Follow gnulib-tool change
2017-12-28  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Make --conditional-dependencies work better.

* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Add argument
referenceable_modules. Use referencable_modules for dependencies.
* pygnulib/GLImport.py (GLImport.__init__): Don't reject the combination
of --conditional-dependencies with --with-tests when mode is 'import'.
(GLImport.gnulib_comp): Pass it.
* pygnulib/GLTestDir.py (GLTestDir.execute): Pass it.

14 months agodoc: Tweak last commit.
Bruno Haible [Mon, 4 Mar 2024 17:26:43 +0000 (18:26 +0100)]
doc: Tweak last commit.

* doc/gnulib-tool.texi (Style of #include statements): Use
@itemize @asis{}. Recommended by Patrice Dumas.

14 months agodoc: Fix build errors.
Collin Funk [Mon, 4 Mar 2024 13:09:51 +0000 (05:09 -0800)]
doc: Fix build errors.

* doc/gnulib-tool.texi (Style of #include statements): Use @itemize w{}
instead of the incorrect @itemize @asis.

14 months agognulib-tool.py: Adjust construction of configure.ac path.
Collin Funk [Mon, 4 Mar 2024 00:00:57 +0000 (16:00 -0800)]
gnulib-tool.py: Adjust construction of configure.ac path.

* pygnulib/GLConfig.py (GLConfig.setAutoconfFile): Join destdir and
configure.ac instead of using relativize.

14 months agognulib-tool.py: Fix output of gnulib-comp.m4.
Collin Funk [Sun, 3 Mar 2024 02:43:26 +0000 (18:43 -0800)]
gnulib-tool.py: Fix output of gnulib-comp.m4.

* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Fix indentation.
Don't print nonstring values into gnulib-comp.m4.

14 months agognulib-tool.py: Make output of test Makefile.am match gnulib-tool.
Collin Funk [Sat, 2 Mar 2024 12:59:04 +0000 (04:59 -0800)]
gnulib-tool.py: Make output of test Makefile.am match gnulib-tool.

* pygnulib/GLModuleSystem.py
(GLModule.getAutomakeSnippet_Unconditional): Don't sort EXTRA_DIST file
names for test modules.

14 months agognulib-tool.py: Fix last commit.
Bruno Haible [Sun, 3 Mar 2024 10:12:39 +0000 (11:12 +0100)]
gnulib-tool.py: Fix last commit.

* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Ignore libname and
libext here.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 38.
Collin Funk [Sat, 2 Mar 2024 07:39:26 +0000 (23:39 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 38.

Follow gnulib-tool change
2020-12-26  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Make --conditional-dependencies work with --with-tests.

* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Add missing
moduletable argument. Handle conditional dependencies like
GLEmiter.lib_Makefile_am.
* pygnulib/GLTestDir.py (GLTestDir.execute): Adjust arguments.

14 months agodoc: Update regarding --create-megatestdir.
Bruno Haible [Sun, 3 Mar 2024 09:52:53 +0000 (10:52 +0100)]
doc: Update regarding --create-megatestdir.

Reported by Alexei Sholomitskiy <asholomitskiy84@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00071.html>
and by Collin Funk <collin.funk1@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00007.html>.

* doc/build-automation.texi (Building gnulib): Discourage the use of
--create-megatestdir with all modules.

14 months agognulib-tool.py: Clarify minimum supported Python version.
Bruno Haible [Fri, 1 Mar 2024 12:22:27 +0000 (13:22 +0100)]
gnulib-tool.py: Clarify minimum supported Python version.

* pygnulib/main.py: Add comment regarding the Python version.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 37.
Collin Funk [Fri, 1 Mar 2024 02:15:19 +0000 (18:15 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 37.

Follow gnulib-tool change
2018-10-22  Bruno Haible  <bruno@clisp.org>
Assume Automake >= 1.11.

* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
(GLEmiter.tests_Makefile_am): Emit a Makefile.am that requires Automake
>= 1.11.
* pygnulib/GLTestDir.py (GLTestDir.execute, GLMegaTestDir.execute):
Likewise.
* pygnulib/constants.py: Update comment.

14 months agognulib-tool.py: Fix GNU Make conversion regular expressions.
Collin Funk [Fri, 1 Mar 2024 02:37:53 +0000 (18:37 -0800)]
gnulib-tool.py: Fix GNU Make conversion regular expressions.

* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Reduce code
duplication. Use re.MULTILINE so '^' matches the start of each line
instead of only the start of a string.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 36.
Collin Funk [Thu, 29 Feb 2024 23:31:17 +0000 (15:31 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 36.

Follow gnulib-tool change
2017-03-14  Mathieu Lirzin  <mthl@gnu.org>
gnulib-tool: don't automatically distribute files from top/

* pygnulib/GLModuleSystem.py
(GLModule.getAutomakeSnippet_Unconditional): Don't distribute files from
top/ automatically.

14 months agoxalloc: Don't use identifier 'nonnull'.
Bruno Haible [Thu, 29 Feb 2024 15:42:00 +0000 (16:42 +0100)]
xalloc: Don't use identifier 'nonnull'.

* lib/xmalloc.c (check_nonnull): Renamed from nonnull.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 35.
Collin Funk [Thu, 29 Feb 2024 06:15:04 +0000 (22:15 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 35.

Follow gnulib-tool change
2023-05-28  Bruno Haible  <bruno@clisp.org>
warnings, manywarnings: Assume autoconf >= 2.64.

* pygnulib/GLConfig.py (GLConfig.default, GLConfig.getAutoconfVersion)
(GLConfig.setAutoconfVersion, resetAutoconfVersion): Set required
Autoconf version to 2.64.
* pygnulib/GLError.py (GLError.__init__, GLError.__repr__): Likewise.
* pygnulib/GLImport.py (GLImport.__init__): Likewise.
* pygnulib/constants.py (DEFAULT_AUTOCONF_MINVERSION): Likewise.
* pygnulib/main.py: Likewise.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 34.
Collin Funk [Thu, 29 Feb 2024 05:17:49 +0000 (21:17 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 34.

Follow gnulib-tool change
2017-05-15  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Fix generated code when libtests contains module 'alloca'.

* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Use @ALLOCA@ for
libtests.a instead of @LTALLOCA@.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 33.
Collin Funk [Thu, 29 Feb 2024 03:05:16 +0000 (19:05 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 33.

Follow gnulib-tool change
2017-03-14  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Don't produce a tests directory with only snippet .h files.

* pygnulib/GLModuleSystem.py
(GLModuleTable.transitive_closure_separately): Don't create a test
directory if all test related modules have applicability 'all'.

14 months agognulib-tool.py: Follow gnulib-tool changes, part 32.
Collin Funk [Thu, 29 Feb 2024 00:35:36 +0000 (16:35 -0800)]
gnulib-tool.py: Follow gnulib-tool changes, part 32.

Follow gnulib-tool change
2018-10-22  Bruno Haible  <bruno@clisp.org>
Fix failure of 'gnulib-tool --create-testdir' with all modules.

* pygnulib/GLTestDir.py (GLTestDir.execute): Exclude the 'timevar'
module from --create-testdir with all modules. Update comment.

14 months agognulib-tool.py: Emit year range on file copyright notices.
Collin Funk [Wed, 28 Feb 2024 21:12:05 +0000 (13:12 -0800)]
gnulib-tool.py: Emit year range on file copyright notices.

* pygnulib/GLInfo.py (GLInfo.copyright_range): New function. Return a
copyright string with a year range.
* pygnulib/GLEmiter.py (GLEmiter.copyright_notice): Use the new function
for file copyright headers.

14 months agognulib-tool.py: Make module sorting more similar to gnulib-tool.
Collin Funk [Wed, 28 Feb 2024 11:33:15 +0000 (03:33 -0800)]
gnulib-tool.py: Make module sorting more similar to gnulib-tool.

* pygnulib/GLImport.py (GLImport.__init__): Sort modules when mode is
'import'.
(GLImport.actioncmd): Don't sort modules while creating actioncmd. Use
preferred quoting style.

14 months agognulib-tool: Make --version output independent of git's configuration.
Bruno Haible [Wed, 28 Feb 2024 10:52:33 +0000 (11:52 +0100)]
gnulib-tool: Make --version output independent of git's configuration.

Reported by Collin Funk <collin.funk1@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00268.html>.

* pygnulib/GLInfo.py (GLInfo.date): Pass --format and --date options, to
override the user's git configuration.
* gnulib-tool (func_version): Likewise. Also pass options '-n 1', to
speed up the operation.