Using Sun WorkShop

Nested Invocations of Distributed Make

When dmake encounters a target that invokes another dmake command, it builds that target serially, rather than concurrently. This prevents problems where two different dmake invocations attempt to build the same targets in the same directory. Such a problem might occur when two different programs are built concurrently, and each must access the same library. The only way for each dmake invocation to be sure that the library is up-to-date is for each to invoke dmake recursively to build that library. The dmake utility recognizes a nested invocation only when the $(MAKE) macro is used in the command line.

If you nest commands that you know will not collide, you can force them to be done in parallel by using the .PARALLEL: construct.

When a makefile contains many nested commands that run concurrently, the load-balancing algorithm may force too many builds to be assigned to the local machine. This may cause high loads and possibly other problems, such as running out of swap space. If such problems occur, allow the nested commands to run serially.