]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
Allow for parallel builds and saved output
authorAndy Fleming <afleming@freescale.com>
Tue, 24 Apr 2012 19:33:51 +0000 (19:33 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 30 Apr 2012 14:52:19 +0000 (16:52 +0200)
commitf588bb034d5d3a0417f45965f1aba4d4cf8a2893
treeb2f85b93db0bb7eb745016c6dc4d66089838a283
parent05f132d74d173854df79bc5541699c3db144e42a
Allow for parallel builds and saved output

The MAKEALL script cleverly runs make with the appropriate options
to use all of the cores on the system, but your average U-Boot build
can't make much use of more than a few cores.  If you happen to have
a many-core server, your builds will leave most of the system idle.

In order to make full use of such a system, we need to build multiple
targets in parallel, and this requires directing make output into
multiple directories. We add a BUILD_NBUILDS variable, which allows
users to specify how many builds to run in parallel.
When BUILD_NBUILDS is set greater than 1, we redefine BUILD_DIR for
each build to be ${BUILD_DIR}/${target}. Also, we make "./build" the
default BUILD_DIR when BUILD_NBUILDS is greater than 1.

MAKEALL now tracks which builds are still running, and when one
finishes, it starts a new build.

Once each build finishes, we run "make tidy" on its directory, to reduce
the footprint.

As a result, we are left with a build directory with all of the built
targets still there for use, which means anyone who wanted to use
MAKEALL as part of a test harness can now do so.

Signed-off-by: Andy Fleming <afleming@freescale.com>
MAKEALL