| 1 | [wiki:howto <- Back to the HOWTO section] |
| 2 | |
| 3 | = TODO: How to enable parallel building = |
| 4 | |
| 5 | * Audience: Users with multi-core systems |
| 6 | * Requires: MacPorts >=1.6.0 |
| 7 | |
| 8 | == Introduction == |
| 9 | |
| 10 | Some ports in MacPorts ports tree can use make -j, a command which allows building parallel. This means, make will spawn multiple build jobs at the same time. With this, the full advantage of the multi core system can be utilized. |
| 11 | |
| 12 | == Configuration == |
| 13 | |
| 14 | === Step 1: '''Edit macports.conf''' === |
| 15 | |
| 16 | Open `/opt/local/etc/macports/macports.conf` in your favorite editor. Find the line |
| 17 | {{{ |
| 18 | buildmakejobs 1 |
| 19 | }}} |
| 20 | and change it to the number of parallel build jobs you want to use. It is common to either use the number of cores or number of cores+1. If you set it to `0`, it will automatically take the number of cores you have. |
| 21 | |
| 22 | That was it. |
| 23 | |
| 24 | == Note == |
| 25 | |
| 26 | Please note that this is opt-in. It will only work with ports specifying `use_parallel_build yes` as some developers are concerned it might break ports which have insufficient dependencies in their Makefiles. |
| 27 | |
| 28 | [wiki:howto <- Back to the HOWTO section] |