NetBSD-Bugs archive

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

Re: toolchain/57431: tool m4 can't regen tools/compat/configure



The following reply was made to PR toolchain/57431; it has been noted by GNATS.

From: Luke Mewburn <luke%mewburn.net@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: toolchain-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
	netbsd-bugs%netbsd.org@localhost
Subject: Re: toolchain/57431: tool m4 can't regen tools/compat/configure
Date: Thu, 25 May 2023 07:05:43 +1000

 On 23-05-24 07:00, Luke Mewburn wrote:
   | >Number:         57431
   | >Category:       toolchain
   | >Synopsis:       tool m4 can't regen tools/compat/configure
   |
   | It's not possible to run "$TOOLDIR/bin/make -C tools/compat regen"
   | with $TOOLDIR/bin/nbm4 as the m4 implementation for tools/autoconf;
   | nbm4 complains about a regular expression used within autoconf.
   | GNU M4 works fine.
   | 
   | This makes it tricky to regen tools/compat after modifying
   | tools/compat/configure.ac for other issues.
 
 I analysed this further - see discussion on source-changed-d:
 - https://mail-index.netbsd.org/source-changes-d/2023/05/24/msg013956.html
 - https://mail-index.netbsd.org/source-changes-d/2023/05/24/msg013957.html
 
 
 In short, we don't need Christos' rev 1.2 change to
   external/gpl3/autoconf/dist/lib/autoconf/general.m4
 and should revert that.
 
 What we need to do is change unescaped GNU m4 regexp and patsubst
 '{' and '}' to '\{' and '\}', because GNU m4 regexp is imp
 
 GNU m4 regexp is implemented using gnulib Emacs-mode regexp
 which are documented in
   https://www.gnu.org/software/gnulib/manual/html_node/emacs-regular-expression-syntax.html
 
 Specifically, { and } have no special meaning for GNU m4;
 these are not interval characters, and \{ and \} are not
 the equivalent (unlike POSIX BREs).
 
 
 I have experimented with converting our m4's -g mode (GNU emulation)
 to escape { and } in regexes (in the twiddle()) function and
 this seems to work. Further testing is required.
 


Home | Main Index | Thread Index | Old Index