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.

> but I don't think I like this change.
> For one thing it feels too different from normal make behavior, in that
> we do "consider" a prerequisite but we do so only to check for
> existence, not for out-of-date-ness, which feels odd to me.
>
> Secondly, I believe the behavior provided by your patch is available
> already; you can use $(wildcard ...) to check if a file exists.  Isn't
> something like this (the gross bits can be hidden in a macro I suppose)
> the equivalent of the change in the patch?
>
>     xyz: foo | $(if $(wildcard bar),,bar) ;
>
>     foo bar: ;
>
> If bar exists then we expand to nothing, else we expand to bar.
>

It is equivalent, as far as i can tell.
What do you think we should do?

regards, Dmitry

Reply via email to