emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build-aux/git-hooks/pre-push


From: Po Lu
Subject: Re: build-aux/git-hooks/pre-push
Date: Tue, 02 May 2023 13:55:02 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Jim Porter <jporterbugs@gmail.com> writes:

> On 4/30/2023 11:33 PM, Po Lu wrote:
>> Btw, I notice that the script falls back to awk if gawk cannot be found.
>> Maybe in that case, the awk script should be rewritten to not utilize
>> getline, sub, function, and other features which do not work with Unix
>> awk?  Or maybe it should try harder to find a POSIX awk?
>
> I'm not sure the best way to do it, but I think trying to find a POSIX
> awk would be the simplest solution.

Hmm, ok.  Unfortunately for some reason the most reliable way to do that
I can think of would be to generate the script with Autoconf... and that
leads to a chicken-egg problem, since the hook is installed from
autogen.sh.

Perhaps we could simply look for:

  - /usr/xpg4/bin/awk
  - mawk
  - nawk

in that order, and not run the script at all if a suitable awk can't be
found.

> That awk script isn't *terribly* complex, but it uses enough POSIX awk
> features that I wouldn't want to try and make it work with UNIX awk
> (even if I knew exactly how to do that).

`(autoconf)Limitations of Usual Tools' describes the limitations of Unix
awk.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]