Hi, Reading what Paul wrote and what Bruno wrote, I think my issue is I was using the wrong branch. I am cloning from: https://github.com/autotools-mirror/m4.git, branch branch-1.6 Looking more closely at the dates of this autotools-mirror, it looks pretty old, so perhaps I am pulling from the wrong place!
It looks like I should be cloning from branch branch-1.4, and I should be using https://git.savannah.gnu.org/git/m4.git/ Indeed Paul when I use the code you highlight below, there is no issue because it is in an eval and so is protected (and all is good). Apologies for going down the wrong rabbit hole here. For the tarball, which is what I started with, I have been pulling from https://ftp.gnu.org/gnu/m4/m4.tar.gz Is that the correct location? Thanks, Mike From: Paul Eggert <egg...@cs.ucla.edu> Date: Thursday, June 2, 2022 at 17:22 To: Mike Fulton <fult...@ca.ibm.com> Cc: bug-gnulib@gnu.org <bug-gnulib@gnu.org> Subject: [EXTERNAL] Re: Failure running gnulib-tool update on z/OS On 5/30/22 20:55, Mike Fulton wrote: > /bin/sh gnulib/gnulib-tool –update > > The error is on line 1571, where the z/OS shell (an older POSIX ‘sh’) issues: > FSUM7728 bad ${} modifier I must be missing context, as current gnulib/gnulib-tool's line 1571 says "autoconf_minversion=" which doesn't have anything to do with ${} modifiers. And although I do see the following code starting on line 1966, I don't see how the failure occurs because the funny ${} modifier is inside a single-quoted string that should not be eval'ed. Is the problem that the z/OS shell accepts ${f//o/e} but rejects ${1//[!a-zA-Z0-9_]/_}? If so, the fix to gnulib-tool should be simple. ----- if (f=foo; eval echo '${f//o/e}') < /dev/null 2>/dev/null | grep fee >/dev/null; then # Bash 2.0 and newer, ksh, and zsh support the syntax # ${param//pattern/replacement} # as a shorthand for # `echo "$param" | sed -e "s/pattern/replacement/g"`. # Note: The 'eval' is necessary for dash and NetBSD /bin/sh. eval 'func_cache_var () { cachevar=c_${1//[!a-zA-Z0-9_]/_} }' else func_cache_var () { case $1 in *[!a-zA-Z0-9_]*) cachevar=c_`echo "$1" | LC_ALL=C sed -e 's/[^a-zA-Z0-9_]/_/g'` ;; *) cachevar=c_$1 ;; esac } fi