[Top][All Lists]

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

Re: Feature request / patch: dependency-only prerequisites

From: Paul Smith
Subject: Re: Feature request / patch: dependency-only prerequisites
Date: Wed, 10 Jul 2019 08:44:46 -0400
User-agent: Evolution 3.32.1-2

On Wed, 2019-07-10 at 10:24 +0200, Christof Warlich wrote:
> > What if we do this instead: create a variable which can contain a list
> > of "hidden prerequisites": they will always be built first but they
> > won't cause any changes in the automatic variables.  If set globally it
> > will apply to all targets.  If set as a target-specific variable then
> > it applies only to that target (and its prerequisites, which can be
> > remediated with the private keyword).
> > 
> > This seems like it could be something generally useful, to ensure some
> > targets are always built first, as well as useful in this context.
> AFAICS, this would serve my desires at least equally well. And the
> more I think about it, the more I get convinced that it would be
> the superior approach for a couple of reasons, like better readability,
> almost no syntactical change, ...
> Furthermore, this variable may quite naturally even honor order-only
> prerequisites by including the pipe character at any point in its
> prerequisite list.

True.  I hadn't fully considered this but you're right.  Possibly it
would work to expand the variable value and use something like
split_prereqs() in file.c on the result to get the list.

> > On another topic, note that these changes are of a size that they do
> > meet the requirement for copyright assignment before they can be
> > applied.  I can forward you the details if that's something you're
> > interested in.
> > 
> > Cheers!
> I certainly would be happy to sign any copyright requirements needed.
> But just let me know what would be most conveniet for _you_ to proceed:
> Would it really help if I try to supply a patch that implements your idea?
> Or is the current "state of affairs" sufficient that the general idea (i.e.
> allowing to add target specific prerequisites without changing automatic
> variables) will eventually go into some future version of GNU Make?

Well, being honest, there's not a great chance I'll find the time to
implement this on my own.  Not because I have a problem with idea, but
just because I don't have a lot of free time.  If it's something you
want your best bet is to implement it yourself.

The more comprehensive the implementation (that is, docs, regression
tests, etc.) the more likely it is to be applied quickly.

Let me know how you want to proceed.

Thanks for your interest in GNU make!

reply via email to

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