>>> "Bruno" == Bruno Haible <[EMAIL PROTECTED]> writes:
Bruno> Your modification does not fix this, because Bruno> - It didn't change the dependencies of this rule, or the rules which Bruno> depend on this one. Therefore this rule can still be started by two Bruno> parallel processes. Bruno> - The first line, "rm -f elc-temp && touch elc-temp", does nothing to Bruno> prevent parallel execution. My impression is that you believe `make -j N all' could spawn several processes on this elc-stamp target. This is not true. Make starts only one command per target, and wait for this target to be completed before building any other dependent targets. The only way to have the same target built several times is to explicitly start separate make processes yourself. (That was what was happening.) When make encounters the following fragment all: one.elc two.elc three.elc one.elc two.elc three.elc: elc-stamp ... it first has to build the dependency: elc-stamp. Only one process does this. Then, and only after elc-stamp has been built, make can run the three "..." commands in parallel. It won't start the "..." commands their dependencies (here elc-stamp) are built. In Greg's output this is clearly apparent. The elc-stamp is run a first time alone. After it has finished, three `make elc-stamp' are explicitly started by the three parallel instance of the "..." rule. Hope it's clearer. Bruno> The only nit on this fix is that it doesn't work on Bruno> filesystems that don't support hard links (like the BeOS Bruno> filesystem). The automake's aux scripts use mkdir as atomic test-and-set. -- Alexandre Duret-Lutz