gnulib-tool.py: Accept valid make syntax for escaped newlines.

2024-04-02 Thread Collin Funk
I noticed that in a few places where gnulib-tool.sh uses 'combine_lines', gnulib-tool.py uses 'remove_backslash_newline'. These functions behave differently. Using this Makefile: $ cat Makefile FILES = file1.c\ file2.c\ file3.c all: @echo $(FILES) $ make file1.c file2.c file3.c The '

gnulib-tool.py: Make regular expression more strict.

2024-04-02 Thread Collin Funk
This regular expression should be much more strict. This patch should fix it. The 'inttostr' module seems like the best way to show this: diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index fac29883f9..1724b250da 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModul

gnulib-tool.py: Fix most IDE warnings

2024-04-02 Thread Bruno Haible
The attached 4 patches fix most of the warnings seen in Eclipse + PyDev IDE. Letting us concentrate on the remaining (1) warning that looks like an actual bug. 2024-04-02 Bruno Haible gnulib-tool: Remove unused variables. * pygnulib/GLConfig.py: Remove unused variables.

Re: gnulib-tool.py: Don't default to 'build-aux' for --auxdir.

2024-04-02 Thread Bruno Haible
Hi Collin, > lines 7251-7274 in gnulib-tool.sh: > > # Analyze configure.ac. > guessed_auxdir="." > guessed_libtool=false > ... > /AC_CONFIG_AUX_DIR/ { > s,^.*AC_CONFIG_AUX_DIR([[ ]*\([^]"$`\\)]*\).*$,guessed_auxdir="\1",p > } > ... > if test -z "$auxdir

[PATCH] renameatu: handle ENOSYS from renameatx_np

2024-04-02 Thread Pádraig Brady
* lib/renameatu.c(): Fall back to renameat() without RENAME_EXCL if "Function not implemented" is returned. This was seen with macFUSE. Reported at https://github.com/coreutils/coreutils/issues/79 --- ChangeLog | 7 +++ lib/renameatu.c | 2 +- 2 files changed, 8 insertions(+), 1 deletio

Re: gnulib-tool.py: Accept valid make syntax for escaped newlines.

2024-04-02 Thread Bruno Haible
Collin Funk wrote: > I noticed that in a few places where gnulib-tool.sh uses > 'combine_lines', gnulib-tool.py uses 'remove_backslash_newline'. > > These functions behave differently. Using this Makefile: > > $ cat Makefile > > FILES = file1.c\ > file2.c\ > file3.c > > all: > @echo $(FI

Re: gnulib-tool.py: Make regular expression more strict.

2024-04-02 Thread Bruno Haible
Hello Collin, > The 'inttostr' module seems like the best way to show this: > > diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py > index fac29883f9..1724b250da 100644 > --- a/pygnulib/GLModuleSystem.py > +++ b/pygnulib/GLModuleSystem.py > @@ -1039,6 +1039,8 @@ class GLModuleTa

Re: gnulib-tool.py: Don't default to 'build-aux' for --auxdir.

2024-04-02 Thread Collin Funk
On 4/2/24 5:22 AM, Bruno Haible wrote: > Not exactly. What this code did: > > if y in self.table: > if y == "auxdir": > if self.table['auxdir']: > return self.table['auxdir'] > return "build-aux" > return self.tabl

Re: gnulib-tool.py: Make regular expression more strict.

2024-04-02 Thread Collin Funk
Hi Bruno, On 4/2/24 7:35 AM, Bruno Haible wrote: > I'm thus applying your patch, with this modified ChangeLog entry. (If a patch > has visible effects, the entry's title line should mention these effects.) Yes, that is better. Thanks! > You have also taught me about the use non-greedy regex matc

Re: gnulib-tool.py: Fix most IDE warnings

2024-04-02 Thread Collin Funk
On 4/2/24 5:05 AM, Bruno Haible wrote: > The attached 4 patches fix most of the warnings seen in Eclipse + PyDev IDE. > Letting us concentrate on the remaining (1) warning that looks like an > actual bug. Thanks for fixing these and the import warnings. I sort of gave up on Eclipse because it coul

gnulib-tool.py: Use [] instead of list() to initialize empty lists.

2024-04-02 Thread Collin Funk
I'd like to start cleaning up some of the unnecessary list(), tuple(), dict() calls. This patch just converts: var = list() to var = [] everywhere. CollinFrom 3a3b4f0a21e83ba2d9ea50a1391a4f54a1bdeeaf Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 2 Apr 2024 11:35:51 -0700 Subje

Re: gnulib-tool.py: Use [] instead of list() to initialize empty lists.

2024-04-02 Thread Bruno Haible
Collin Funk wrote: > This patch just converts: > > var = list() > > to > > var = [] > > everywhere. So that we can grep for 'list(' to find where non-empty lists are getting constructed (conversion, clone). Nice. Applied. Bruno

Re: gnulib-tool.py: Use [] instead of list() to initialize empty lists.

2024-04-02 Thread Collin Funk
On 4/2/24 12:21 PM, Bruno Haible wrote: > So that we can grep for 'list(' to find where non-empty lists are getting > constructed (conversion, clone). Nice. Applied. Yes. But be careful because we have 'modulesystem.list()'. I almost changed that to 'modulesystem.[]'. :) Collin

pthread-spin doesn't define HAVE_PTHREAD_H

2024-04-02 Thread Collin Funk
Hi Bruno, It looks like it is time for me to start learning m4. When running ./configure in findutils I see this warning: checking for pthread.h... yes ... ./configure: line 31218: test: =: unary operator expected checking for pthread_spin_init... yes checking for pthrea

Re: pthread-spin doesn't define HAVE_PTHREAD_H

2024-04-02 Thread Collin Funk
On 4/2/24 1:23 PM, Collin Funk wrote: > When running ./configure in findutils I see this warning: > > checking for pthread.h... yes > ... > ./configure: line 31218: test: =: unary operator expected > checking for pthread_spin_init... yes > checking for pthread_t... yes >

gnulib-tool.py: Don't ignore the argument to --doc-base.

2024-04-02 Thread Collin Funk
When building GNU PSPP I see this: --- /home/collin/.local/src/pspp/gl/m4/gnulib-cache.m4 2024-04-02 18:10:06.209522277 -0700 +++ /home/collin/.local/src/glpyXBzSID/gl/m4/gnulib-cache.m42024-04-02 18:09:37.828467148 -0700 @@ -31,7 +31,7 @@ # --lib=libgl \ # --source-base=gl \ # --m4-b