Hi,

On 2015-08-19 13:42, Jörg Frings-Fürst wrote:
Am Samstag, den 15.08.2015, 10:23 +0200 schrieb Pino Toscano:
Source: xsd
Version: 4.0.0-1
Severity: wishlist
Tags: patch

xsd seems to build fine with multiple build jobs when building.
Thus, my suggestion is to enable the parallel build (with the
--parallel option of dh) to speed up the compilation when requested
(see also Policy §4.9.1).


I have add "--parallel" to d/rules. Also I have changed the make calls
from "make -j1" to "make -j$(NO_CPUS)".

#
# Get the number of cpus
#
NO_CPUS=$(shell cat /proc/cpuinfo | grep processor | wc -l)

[...]

override_dh_auto_build:
        make -j$(NO_CPUS)

override_dh_auto_test:
        make -j$(NO_CPUS) test


Why was the above added? --parallel to dh works just fine, as it reads
the right number of parallel jobs to use from the DEB_BUILD_OPTIONS
envvar (e.g. DEB_BUILD_OPTIONS=parallel=2), instead of (ab)using all
the available cores in the machine.

Please remove the added code, as it
a) does not respect the actual number of parallel jobs specified with a
   envvar well-defined in Debian Policy
b) unconditionally uses all the cores, even when not requested
c) breaks when /proc/cpuinfo is not available (i.e. on Hurd)

Thanks,
--
Pino Toscano

Reply via email to