bug-make
[Top][All Lists]
Advanced

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

Re: Idea: Add .COMMANDCHANGE and .CACHE


From: Britton Kerin
Subject: Re: Idea: Add .COMMANDCHANGE and .CACHE
Date: Mon, 10 Jun 2019 15:40:53 -0800

On Mon, Jun 10, 2019 at 2:18 PM David A. Wheeler <address@hidden> wrote:
>
> On Mon, 10 Jun 2019 12:10:26 -0800, Britton Kerin <address@hidden> wrote:
> > The trickery required is not too fancy:
> >
> >      foo.o: foo.c Makefile
> >              ...
> > or
> >
> >      foo.o: foo.c $(PARANOID_REBUILD)
> >              ...
> >
> > Then use when desired:
> >      (export PARANOID_REBUILD=Makefile && Make)
>
> No.
>
> That's not at *ALL* the same thing.  With those uses, *all* rules
> are rerun if *ANY* change happens in the Makefile, even if almost

No, just the rules that :Makefile, which you can easily tune if it matters.
Heck, you can include some_fragment.mk that has the recipes that
are a concern and depend on that if you really need that granularity,
and then the dependency that you want is explicit.

> all the rules and parameters do not change at all.
> Since the whole point of make is to "only run what's needed",
> that doesn't resolve the problem at all.
>
> In contrast, ".COMMANDCHANGE" would only run a rule
> if that PARTICULAR rule changed (once expanded) in the Makefile.
> In many cases that would skip much of the work.
> Which is the point.

I get it, I just doubt it's worth the extra feature for something that
can be expressed in terms of existing features.



reply via email to

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