Compiling deb with debian/rules in parallel

Make supports parallel compiling, with the Linux kernel compile recommending you make use of your expensive CPU cores something like this:

make -j 4

You can even do that if you don’t have a multiprocessor system, since you have a multitasking operating system.

Today, while recompiling ImageMagick with FFT support, I found you can compile in parallel like this:

apt-get source imagemagick
sudo apt-get build-dep imagemagick
imagemagick-*
debian/rules -j 4 binary

The load goes up to around 5.0 for the duration of the compile, which is exactly what you want, to set fire to your inadequately cooled CPU. Also, it finishes faster. (I’ll bet it works for other .deb’s too…)

This entry was posted in Stuff and tagged , , , , . Bookmark the permalink.