From: Paul Smith Date: Tue, 16 Jul 2024 21:40:33 GMT Subject: Re: Can dependency on /bin/sh be removed? Message-ID: In-Reply-To: <87jzhlf2i4.fsf@igel.home> On Tue, 2024-07-16 at 23:30 +0200, Andreas Schwab wrote: > On Jul 16 2024, Jeff King wrote: > > > Again, it's possible that we could detect that no shell > > metacharacters are in play and do the word-splitting ourselves. But > > at that point I think it should go into run-command's > > prepare_shell_cmd(). > > This is what GNU make does (see construct_command_argv_internal), for > performance reason.  But run_command is probably not performance > critical. Also I would definitely not recommend anyone look at this part of the GNU Make code for inspiration. It's an unholy mess. The concept is very good though.