On Wed, Mar 19, 2025 at 5:59 AM Dmitry Goncharov <dgoncha...@users.sf.net> wrote: > > On Tue, Mar 18, 2025 at 8:06 AM Paul Smith <psm...@gnu.org> wrote: > > I see from the patch: you don't mean "never" you mean, only if the > > prerequisite does not exist will it be updated. > > Right. > > > I agree this preserves probably the most common reason for using OO > > prereqs (to create directories) > > This preserves the directory creation use case and also the use of > order-only prerequisites for synchronization as sentinel files instead > of .WAIT.
FWIW I've used them many times but never for either of these purposes. I think Paul's idea of how it should work is probably the best. It's the one that seems hardest to achieve other ways. The closest I can think of is to just subsume the recipe of the order-only dependency into the recipe of the dependent target, but then you're back to reinventing make or running recursively in the recipe if the dependency is itself complex (i.e. has dependencies of it's own). In my uses it has always been the case that the order-only dependency is itself a buildable target more complicated than a dir or stamp. Britton