[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] m4: Update invocation of AC_PROG_LEX
From: |
Łukasz Stelmach |
Subject: |
Re: [PATCH] m4: Update invocation of AC_PROG_LEX |
Date: |
Wed, 16 Aug 2023 22:01:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
"Zack Weinberg" <zack@owlfolio.org> writes:
> On Wed, Aug 16, 2023, at 2:38 AM, Łukasz Stelmach wrote:
>> Commit 73f1be5e42e3 to autoconf has introduced an argument to
>> AC_PROG_LEX. Invocation without the argument has been treated as
>> obsolete since then.
>
> This should go to automake-patches, not autoconf-patches.
Indeed.
> Also, you should update the manual (automake.texi) to document that
> AM_PROG_LEX now takes an argument and what that argument is. Finally,
> I'd like to suggest a small improvement to the code: instead of
>
>> -AC_REQUIRE([AC_PROG_LEX])dnl
>> +AC_PROG_LEX([$1])dnl
>
> you should have
>
> -AC_REQUIRE([AC_PROG_LEX])dnl
> +AC_PROVIDE_IFELSE([AC_PROG_LEX], [], [AC_PROG_LEX([$@])])dnl
>
> This change ensures that AC_PROG_LEX will not be invoked a second time
> if it has already been used directly, which is important both because
> that's the way it has always worked, and because we (autoconf maintainers)
> have been telling people to work around the problem you're fixing by using
> AC_PROG_LEX _as well as_ AM_PROG_LEX. It also makes AM_PROG_LEX oblivious
> to how many arguments AC_PROG_LEX actually takes, which could be important
> future-proofing.
Thanks for help. I'll send v2 soon.
--
Miłego dnia,
Łukasz Stelmach
signature.asc
Description: PGP signature