Next: 4.2 Instances of different Up: 4 Multiple instances Previous: 4 Multiple instances

4.1 Multiple instances of the same type

Multiple instances of the same type are built in parallel.

Let's say that you are building two tools instead of one. Your GNUmakefile might look like the following one:

include $(GNUSTEP_MAKEFILES)/common.make

TOOL_NAME = HelloWorld HelloMoon
HelloWorld_OBJC_FILES = HelloWorld.m main1.m
HelloMoon_OBJC_FILES = HelloMoon.m main2.m

include $(GNUSTEP_MAKEFILES)/tool.make

When you build this in gnustep-make using 'make -j', the two tools will be considered independent and be built in parallel.

So, the top-level flow looks as follows:

Step 0. Execute before-all:: if it exists
Step 1. Build HelloWorld and HelloMoon in parallel
Step 2. Execute after-all:: if it exists

Building each of the HelloWorld and HelloMoon tools would follow the flow described in the previous section, meaning that the compilation of the files for each of them will be parallelized too! If you build with 'make -j' (and your CPU can make 4 concurrent flows of execution), for example, it is likely that all the 4 files will be compiled in parallel. The two tools are built in parallel, and then each of them fires the compilation of their 2 files in parallel. As a result, all of the 4 files are actually built in parallel. All the other stages of building the tools are also done in parallel; for example, the tools are linked independently, in parallel.


Next: 4.2 Instances of different Up: 4 Multiple instances Previous: 4 Multiple instances
2010-03-12