Use multi-threaded make by default?

9,327

(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.

Share:
9,327

Related videos on Youtube

John Doe
Author by

John Doe

Updated on September 18, 2022

Comments

  • John Doe
    John Doe almost 2 years

    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.