help-make
[Top][All Lists]
Advanced

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

Re: parallel rebuild


From: Philip Guenther
Subject: Re: parallel rebuild
Date: Tue, 31 Jan 2006 01:15:58 -0700

On 1/31/06, Angel Tsankov <address@hidden> wrote:
> On 1/30/06, Angel Tsankov <address@hidden> wrote:
> > > %% "Angel Tsankov" <address@hidden> writes:
...
> (In my experience, Paul doesn't waste his time with Windows bashing.)
>
> Do you really think that I care?!

Ah, I see.

...
> Paul's point was that the chunk of makefile you gave does not include
> anything that would force the actions associated with the 'clean'
> target to be completed before the 'build' target is started when the
> 'rebuild' target is invoked.  Ergo, during a 'make rebuild', you may
> be overlapping the removing of files with the determination of which
> files must be rebuilt.  If the removing runs faster, then you'll see
> stuff rebuilt.  If the determination of what must be rebuilt runs
> faster then only some of the stuff will be rebuilt.  Apparently you
> missed that point of Paul's.
>
> I don't agree.  Take a look at this part of my first post:
>
> It seems that when I execute the command (i.e. "make --jobs=4
> rebuild") after a successful build make
> sees that all files are up to date and does not do anything to update
> the build target. However, it updates the clean target by removing the
> object and output files.

I fail to see how that's inconsistent with what I described: I can see
an ordering of operations that is consistent with your makefile and
that behavior.  Since you don't say what in my post you disagree with
I don't know what to describe further.


> I totally agree with you about the build_after_clean_target - it was
> just recommended in a different thread. The thread is titled
> "Prerequisites processing order" and was started by me. The post is by
> Paul D. Smith and is the last but one in the thread. Here it is (have
> in mind that multiprocessing is implied by the context of the thread):
>
>  rpjd> if prereq2 has to be done before prereq1, then make the latter a
>  rpjd> prerequisite of the former.
>
>   rpjd> target: prereq1
>   rpjd> prereq1: prereq2

Taken literally, that would mean making the 'build' target depend on
the 'clean' target.  As you observed in this thread, that would work
but mean that you couldn't build without cleaning.  So, his (literal)
suggestion would work but have a side-effect that you don't want. 
That's not surprising given that you didn't mention in the previous
thread that the prereq you wanted was a 'clean' target.


> And finally, I am looking for a solution that does not involve
> recursive invocation of make (if such one exists).

You can do it using MAKECMDGOALS, but I'll warn you up front that
going that route may result in undesirable side-effects compared to
the recursive invocation of make.


Philip Guenther

(For those trying to follow the thread and having problems figuring
out who said what: sorry, but Angel's mail client apparently doesn't
quote responses.)




reply via email to

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