LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Parallel jobs with dpkg-buildpackage (https://www.linuxquestions.org/questions/linux-software-2/parallel-jobs-with-dpkg-buildpackage-4175502264/)

miguelg 04-19-2014 05:37 AM

Parallel jobs with dpkg-buildpackage
 
Attempting to build a deb package with 8 parallel jobs but can only spawn one single job.

I've got the following debian/rules file:

Code:

#!/usr/bin/make -f
export DH_OPTIONS


%:
        dh $@  --with autotools-dev

I tried running:

- dpkg-buildpackage -j8
- setting (and exporting) DEB_BUILD_OPTIONS=parallel=8
- and even setting (and exporting) MAKEFLAGS=-j8

Nothing worked and the build makes use of only one core. What's the correct procedure to spawn a parallel build?


NOTE: source builds using all 8 logical cores if make -j8 is used instead.

miguelg 04-19-2014 07:36 AM

Found solution to this and it is as simple as appending --parallel to dh in the debian/rules file. So the rules file becomes:

Code:

#!/usr/bin/make -f
export DH_OPTIONS


%:
        dh $@  --with autotools-dev --parallel

dpkg-buildpackage still needs to be invoked with -j<num_threads> though.


All times are GMT -5. The time now is 10:40 AM.