]> git.donarmstrong.com Git - debhelper.git/commit
Support parallel building in makefile buildsystem
authorModestas Vainius <modestas@vainius.eu>
Wed, 28 Oct 2009 19:49:34 +0000 (15:49 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 28 Oct 2009 19:49:34 +0000 (15:49 -0400)
commitdace0773fe5f66fdf040f54383322e21a65fa1e8
treed03e084c1980708e31773b1b422cfec4e5546c7d
parent834d95aaba24e5cee1c5a74078a09443f5e122a7
Support parallel building in makefile buildsystem

1) Add routine to Dh_Lib (used by dh and makefile.pm) which is capable of
detecting make jobserver and job control options from the MAKEFLAGS environment
variable. It also generates and returns a clean up MAKEFLAGS from these
options.

2) Add --parallel option to build system framework which allows source packages
to specify that they support parallel building. Optional value for this option is
the number of maximum parallel process to allow. However, the actual number of
parallel process (if any) for the specific build is determined from
DEB_BUILD_OPTIONS env variable as specified by Debian Policy.

By default (no --parallel option) parallel is neither enabled nor disabled
(depends on the external environment). However, dh may pass --parallel to
dh_auto_* implicitly in case 4) described below.

3) Add parallel support for makefile buildsystem. This implementation
forcefully starts a new make job server (or disables parallel) for the number
of process requested. If --parallel was not passed to the build system at all,
the build system will only clean up MAKEFLAGS from stale jobserver options to
avoid pointless make warnings.

4) If dh detects that it is being run by dpkg-buildpackage -jX and it is NOT
run with "+" prefix from debian/rules (i.e. jobserver is not reachable), it
enables --parallel implicitly. This closes: #532805.

Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Debian/Debhelper/Buildsystem.pm
Debian/Debhelper/Buildsystem/makefile.pm
Debian/Debhelper/Dh_Buildsystems.pm
Debian/Debhelper/Dh_Lib.pm
debhelper.pod
dh
t/buildsystems/buildsystem_tests
t/buildsystems/parallel.mk [new file with mode: 0644]