[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplicate dependencies (with .WAIT)

From: Paul Smith
Subject: Re: duplicate dependencies (with .WAIT)
Date: Tue, 01 Nov 2022 19:31:43 -0400
User-agent: Evolution 3.46.0 (by Flathub.org))

On Tue, 2022-11-01 at 22:51 +0100, Frank Heckenbach wrote:
> That's why I only suggested a warning since it may be un expected
> (especially with ".WAIT") or unintended (even in your example at the
> end, why would one put "pause" twice intentionally).

I see.  We can't do this; there are tons of ways that duplicate targets
can end up in the prerequisites of a target: by having them in
variables, or multiple different makefiles that define extra
prerequisites, etc.  Most importantly, they are sometimes required! 
For example if you need to link a given library twice to resolve
symbols when two libraries reference each other:

   prog: foo.o -lbar -lfoo -lbar

This is why we have $^ vs. $+ automatic variables.

Adding a warning like this in general will definitely cause a lot of
annoyance and frustration.

I agree that .WAIT is a new feature but I still don't think it's a good
idea; we can still have situations where due to variable expansion or
extra targets defined the same target ends up in the prerequisites list

Maybe if in the future we add a warning mode with things that can be
enabled/disabled (something I've been considering after years of
answering mostly the same questions on StackOverflow) this might belong
there, at least in some specific situations.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]