Make “make” default to “make -j 8”

前端 未结 8 1078
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-28 20:00

Is there a way that I can make

$ make

default to:

$ make -j 8

?

8条回答
  •  無奈伤痛
    2020-12-28 20:10

    Add

    MAKEOPTS='-j8'
    MAKEFLAGS='-j8'
    

    to /etc/make.conf (create it if it doesn't already exist).

    If that doesn't work, add

    export MAKEOPTS='-j8'
    export MAKEFLAGS='-j8'
    

    to your system-wide profile (e.g., /etc/profile).

    For me, MAKEOPTS alone didn't work. Possibly MAKEFLAGS is all that's needed.

提交回复
热议问题