[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: texindex awk syntax error
From: |
Bruno Haible |
Subject: |
Re: texindex awk syntax error |
Date: |
Mon, 24 Oct 2022 20:19:50 +0200 |
Eli Zaretskii wrote:
> > On the system that Bruno was testing, "awk" didn't work so "nawk" was
> > preferred.
>
> So maybe we should verify that the "awk": we found satisfies our
> needs, and not just rely on the name?
Yes, that would be most in line with the Autoconf principles.
> E.g., we could see what "awk"
> outputs for "--version", and judge by that?
$prog --version
does not help here, because nawk and mawk don't implement it. But what
works, is a test whether $prog supports the function syntax: On this
platform,
gawk 'function foo () {}' 2>/dev/null
nawk 'function foo () {}' 2>/dev/null
both have exit code 0, whereas
awk 'function foo () {}' 2>/dev/null
has exit code 2.
To implement this, use a variant of AC_CHECK_PROGS that accepts a test
argument. (AM_PATH_PROG_WITH_TEST from gnulib/m4/progtest.m4 is not the
right there here, because it searches only for a single program name,
not multiple ones.)
Bruno
- Re: texinfo-6.8.90 pretest on Solaris 11.4, (continued)
- Re: texinfo-6.8.90 pretest on Solaris 11.4, Bruno Haible, 2022/10/23
- texindex awk syntax error, Gavin Smith, 2022/10/23
- Re: texindex awk syntax error, Bruno Haible, 2022/10/23
- Re: texindex awk syntax error, Gavin Smith, 2022/10/23
- Re: texindex awk syntax error, Eli Zaretskii, 2022/10/24
- Re: texindex awk syntax error, Gavin Smith, 2022/10/24
- Re: texindex awk syntax error, Eli Zaretskii, 2022/10/24
- Re: texindex awk syntax error, Gavin Smith, 2022/10/24
- Re: texindex awk syntax error, Eli Zaretskii, 2022/10/24
- Re: texindex awk syntax error,
Bruno Haible <=
- Re: texindex awk syntax error, Gavin Smith, 2022/10/25
- Re: texindex awk syntax error, Bruno Haible, 2022/10/29
Re: texinfo-6.8.90 pretest on mingw, Bruno Haible, 2022/10/22
Re: texinfo-6.8.90 pretest on mingw, Eli Zaretskii, 2022/10/23