[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 52.
From: |
Bruno Haible |
Subject: |
Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 52. |
Date: |
Mon, 11 Mar 2024 12:57:28 +0100 |
Hi Collin,
> On 3/10/24 5:13 AM, Bruno Haible wrote:
> > automake_options = {x for y in configure_ac_automake_options for x in
> > y.split()}
>
> I've attached the fixed patch.
Thanks, applied.
> I would like to double check the regular expression I used:
>
> pattern = re.compile(r'^.*AM_INIT_AUTOMAKE\([\[ ]*([^\]\)]*).*$',
> re.MULTILINE)
>
> Compared to the sed one:
>
> s,^.*AM_INIT_AUTOMAKE([[ ]*\([^])]*\).*$,\1,p
This looks good to me. 'sed' accepts POSIX BREs, where '(' and '[' stand for
the literal '(' and '[' characters unless escaped.
Also, I applied the attached follow-up, in order to make the logic of the code
easier to follow. There was nothing wrong in your code; it's just to make it
more straightforward to read.
- There's no need to define 'pattern' before reading the file. So, define
it after reading the file.
- The 'base' variable is only needed in the 'if not found_subdir_objects'
case. So, define it only in this case.
- Make the two code blocks that read configure.ac and Makefile.am more
similar.
Bruno
0001-gnulib-tool.py-Make-some-code-more-straightforward.patch
Description: Text Data
- [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51., Collin Funk, 2024/03/09
- [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 52., Collin Funk, 2024/03/09
- [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54., Collin Funk, 2024/03/10
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54., Bruno Haible, 2024/03/10
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54., Collin Funk, 2024/03/10
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54., Collin Funk, 2024/03/11
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54., Bruno Haible, 2024/03/11
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54., Collin Funk, 2024/03/11
Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 52., Bruno Haible, 2024/03/10
Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51., Bruno Haible, 2024/03/10
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51., Collin Funk, 2024/03/10
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51., Bruno Haible, 2024/03/10
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51., Collin Funk, 2024/03/11
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51., Bruno Haible, 2024/03/11
- Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51., Collin Funk, 2024/03/11