]> rtime.felk.cvut.cz Git - omk.git/commit
Fixed problem with parallel make (-j) caused by the previous change
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Apr 2008 15:47:00 +0000 (15:47 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Apr 2008 15:47:00 +0000 (15:47 +0000)
commitff506fa72fa1df6d457c64f14a12204b54cf69ab
tree75697a14b41c5f2a40d487757ea25d2fa7681b6b
parent6b4a42a8a85e1e94011d2cb126919a3be7c1802e
Fixed problem with parallel make (-j) caused by the previous change

If compilation was invoked as make -j, pass serialization didn't work.
In other words, it was possible that, for example, some library-pass
targets was made before all include-pass targets was finished. This
meant all include files were not available for compilation of libraries.

This behavior was caused the fact that recently introduced <pass>-XXX-subdir
targets was direct dependencies of <pass>. Since pass serialization is
done by putting one pass as dependency of another pass, this
serialization dependencies was on the "same level" as -subdir
dependencies and make -j executed them in parallel.

This was fixed by adding another target called <pass>-submakes which is
called recursively from <pass> target after all "serialization
dependencies" are processed. All -subdir targets are dependencies of
only -submakes target and hence are not intermixed with serialization
dependencies.

To avoid overhead caused by this additional recursive make invocation,
all recursive makes are invoked directly with the new -submakes target
as their goal. Hence, the original pass target is called only in the
top-level make.

This change can influence some "nonstandard" constructs used sometimes
in Makefile.omk that count upon invocation of the original pass in every
directory. This issue will be solved by upcoming patches.

darcs-hash:20080418154711-f2ef6-365337cb69c6aeb0eb659c6f2ad74605d80de1d8.gz
snippets/base
tests/parallel_make/Makefile [new file with mode: 0644]
tests/parallel_make/Makefile.omk [new file with mode: 0644]
tests/parallel_make/config.omk-default [new file with mode: 0644]
tests/parallel_make/dir1/Makefile [new file with mode: 0644]
tests/parallel_make/dir1/Makefile.omk [new file with mode: 0644]
tests/parallel_make/dir2/Makefile [new file with mode: 0644]
tests/parallel_make/dir2/Makefile.omk [new file with mode: 0644]
tests/parallel_make/dir3/Makefile [new file with mode: 0644]
tests/parallel_make/dir3/Makefile.omk [new file with mode: 0644]
tests/parallel_make/runtest [new file with mode: 0755]