help-make
[Top][All Lists]
Advanced

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

Re: Mixing grouped explicit targets rule with static pattern rule


From: Paul Smith
Subject: Re: Mixing grouped explicit targets rule with static pattern rule
Date: Fri, 19 Mar 2021 15:36:46 -0400
User-agent: Evolution 3.36.4-0ubuntu1

On Fri, 2021-03-19 at 18:39 +0000, Nithish Chandran wrote:
> Please allow me to respond. We're using static pattern rule to create
> object files and were concerned about the situation discussed here ,
> where .d files could be corrupted if the build is killed at the wrong
> moment since make is not aware that it is creating .d files in the
> recipe and would not delete it when the build is killed. While there
> is a solution for this problem, we wanted to investigate options as
> well, that's when we came across grouped targets. Letting make know
> about the .d file being generated in the recipe would prompt it to
> delete the targets (.o and .d) if the build is killed during recipe
> execution.

If you do this, you will break that entire model of header file
tracking.  That model explicitly depends on make NOT knowing how to
build the .d files.  If it DOES know how to build the .d files, then it
will rebuild them as part of the include file operation, which is the
approach that the "advanced dependency generation" model is trying to
avoid in the first place.

I think this approach is a non-starter, regardless of whether there are
grouped targets or not.

I think I am having problems visualizing what you are looking for;
maybe if you provided some examples of what you were thinking and what
it might look like (obviously this doesn't have to be things that work
today).

> We were able to use normal pattern rules along with grouped targets,
> we're not sure if it is good idea to expand the scope of creating the
> object files since we don't want to create any files that we don't
> intend to. That is the reason we wanted to check if there are any
> plans to support combining group targets with static pattern rules.

Sorry but I didn't understand that.




reply via email to

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