8

Is there any way to have make use multi-threading (6 threads is ideal on my system) system-wide, instead of by just adding -j6 to the command line? So, that if I run make, it acts the same as if I was running make -j6? I want this functionality because I install a lot of packages from the AUR using pacaur (I'm on Arch), so I don't directly run the make command, but I would still like multi-threading to build packages faster.

12

(pacaur uses makepkg, see https://wiki.archlinux.org/index.php/Makepkg )

In /etc/makepkg.conf add MAKEFLAGS="-j$(expr $(nproc) \+ 1)" to run #cores + 1 compiling jobs concurrently.

When using bash you can also add export MAKEFLAGS="-j$(expr $(nproc) \+ 1)" to your ~/.bashrc to make this default for all make commands, not only those for AUR packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.