help-make
[Top][All Lists]
Advanced

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

Re: parallel rebuild


From: Angel Tsankov
Subject: Re: parallel rebuild
Date: Tue, 31 Jan 2006 00:29:06 +0200

%% "Angel Tsankov" <address@hidden> writes:

 at> I have a makefile that looks something like this (the build
target has
 at> been omitted):

 at> .PHONY: clean build build_after_clean rebuild
 at> rebuild:   clean build_after_clean
 at>  @echo "rebuilt"
 at> build_after_clean: clean build
 at>  @echo "built"
 at> clean:
 at> # remove object and output files
 at>  @echo "cleaned"

 at> I should probably add that "make rebuild" works fine every time
it
 at> is executed. I'm using GNU make 3.80 on Windows XP Pro. How can
I
 at> cope with this unfortunate situation?

Interesting.  I wasn't aware that parallelism worked on Windows
platforms.

Ha-ha-haaa... What a futile attempt at being funny!

Anyway, nowhere above have you declared that the "clean" target
depends
on "build".  Also, you don't show the "build" target so all we can
do is
assume it is not defined to depend on "clean".

That being the case, the order in which "build" is invoked relative
to
"clean" is not defined.  It could be invoked first, or second.  I'm
not
sure if this is your problem or not; without a definition of "build"
I
don't see any other issue above.

You have obviously missed the point, Paul. This is so bad for you:(
Now, let me explain the situation in more detail specially for you.
So, one normally has a build and a clean target that do smth but they
DO NOT depend on each other, right, Paul? Then, the same guy needs a
rebuild target that performs a clean followed by a build. I hope you
have no problem following me so far, do you? If so, may I am I expected to implement such a rebuild target.

You might check on the address@hidden mailing list for more help
with
Windows-specific issues, as well.

I am not sure this is a Windows-specific problem. Have a look at this output from a dual G4 PowerPC (running yellowdog linux):
make -j 2 rebuild
g++ -c -o a.o a.cpp
g++ -c -o main.o main.cpp
g++ -o test a.o main.o
make -j 2 rebuild
make -j 2 rebuild
g++ -c -o a.o a.cpp
g++ -c -o main.o main.cpp
g++ -o test a.o main.o
make -j 2 rebuild
make -j 2 rebuild
g++ -c -o a.o a.cpp
g++ -c -o main.o main.cpp
g++ -o test a.o main.o

The test suite is contained in the attached archive.



Wish you some more inspiration this time, Paul.

Attachment: parallel_rebuild.zip
Description: Binary data


reply via email to

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