Re: [bug #67265] $(file) in commands is executed too early

Edward Welbourne <[email protected]> Tue, 1 Jul 2025 14:15:23 +0000
Newsgroups gmane.comp.gnu.make.bugs
Message-ID <DU0PR02MB82187A297FDADD8AFA354E3A8741A@DU0PR02MB8218.eurprd02.prod.outlook.com>
Zack Weinberg (30 June 2025 19:23) wrote:
> It doesn't have to control what happens inside a shell command.  All
> it has to do is split the recipe into individual commands *before*
> expanding anything -- this is perfectly possible, since \n and ;
> *don't* separate commands when they come from expansion -- and then,
> for each command string, perform expansion, execute the result, wait
> for execution to complete.  It's *already* waiting for execution of
> each command in a recipe before going on to the next one.

Could that run into problems if someone's setting of SHELL was somewhat
unorthodox ?  Remember that commands may be passed to an arbitrary
command interpreter, $SHELL, and make can't hope to know the parsing
rules for every command interpreter's language.

        Eddy.

Confidential