On Mon, Jun 10, 2024 at 07:11:53PM +0200, Bruno Haible wrote: > It sounds like a bug in /bin/sh. And indeed, when I use bash to execute this > script, no problem any more. It's not the first /bin/sh bug on this system > that we encounter: > https://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00030.html > > My workaround for this kind of bugs is to define the environment variable > CONFIG_SHELL=/usr/bin/bash > in my environment. > But all invocations of the tp/tests/run_parser_all.sh script should then > run it through > ${CONFIG_SHELL-/bin/sh} tp/tests/run_parser_all.sh > instead of > tp/tests/run_parser_all.sh
$(SHELL) is already used in some cases and for rules generated by autoconf. It seems to abide to CONFIG_SHELL setup, but only when passed on ./configure command line, not at 'runtime'. I would propose to use $(SHELL) in every make rule that call a shell script, and also possibly in shell scripts that call other shell scripts. What do you think? -- Pat