Re: [RFC PATCH v4 0/3] per-target .ONESHELL with shard recipe fix

"David A. Wheeler" <[email protected]>
Newsgroups gmane.comp.gnu.make.bugs
Message-ID <[email protected]>

> On Dec 23, 2024, at 7:56 PM, Britton Leo Kerin <[email protected]> wrote:
> 
> Another crack at per-target .ONESHELL.
> 
> The major problem with v3 was that the shared struct commands for
> implicit rules, .DEFAULT rules suffix rules etc. caused use of .ONESHELL
> with any target covered by such a rules to "infect" other targets
> sharing the recipe (but not themselves named as .ONESHELL prerequisites)
> with oneshell-ness.  That isn't how other special targets work wrt
> their dependencies and would obviously be a bug.
> 
> The current version here "fixes" this by adding oneshell_* versions of
> some struct commands fields and using them as appropriate.  I added a
> bunch of tests to ensure I'd found all the sharing and handled it
> correctly.

I didn't look at the proposed code changes, but this *behavior* seems exactly correct.
".ONESHELL", applied to a specific target, should *only* apply to that target and
not to anything else it calls. It's only a property of that specific target.

Thanks!

--- David A. Wheeler
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.