[Top][All Lists]

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

parallel rebuild

From: Angel Tsankov
Subject: parallel rebuild
Date: Sun, 29 Jan 2006 11:30:08 +0200


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

.PHONY: clean build build_after_clean rebuild

rebuild:   clean build_after_clean
@echo "rebuilt"

build_after_clean: clean build
@echo "built"

# remove object and output files
@echo "cleaned"

When I execute the command "make --jobs=4 rebuild" I get this output:

<build output omitted>

However, if I execute the same command again, I get only this:


And strangely, the build folder is empty. If I execute the same
command one more time, I get the same results as I got from the first
run, i.e. the rebuild is fine. In sum, every odd run is OK, and every
even run has the effect as if only the clean target has been executed.
It seems that when I execute the command 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 should probably add that "make rebuild"
works fine every time it is executed. I'm using GNU make
3.80 on Windows XP Pro. How can I cope with this unfortunate

reply via email to

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