Modestas Vainius wrote: > Actually, it turns out makefile.pm can support parallel building without any > additional trickery needed from package maintainer. It just needs to handle > DEB_BUILD_OPTIONS parallel option and clean up MAKEFLAGS a bit in order to > avoid confusing users with make warnings or prevent it from enforcing -j1.
> + if (exists $ENV{DEB_BUILD_OPTIONS} && $ENV{DEB_BUILD_OPTIONS} =~
> /\bparallel=(\d+)\b/) {
> + unshift @_, "-j$1";
> + # Make sure a new jobserver is started.
> + cleanup_makeflags("force");
I need to be careful here. This change makes *all* packages that use
a make-based buildsystem start honoring DEB_BUILD_OPTIONS=parallel.
But, turning on -j is known to break many crummy Makefiles. That's why
DEB_BUILD_OPTIONS=parallel is documented as something that should only
be enabled if the package's build system is known to support it.
So, if we make this change, someone who currently always builds with
dpkg-buildpackage -j2 may suddently see packages failing to build, or
even misbuilding somehow. This seems very risky.
Maybe instead dh needs to get a -j option; then if a rules file wants
to support DEB_BUILD_OPTIONS it could set the option. Or something along
those lines. However, would that really be any better than my earlier
suggestion for adding an override target?
--
see shy jo
signature.asc
Description: Digital signature

