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

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

Is there a way that I can make

$ make

default to:

$ make -j 8

?

8条回答
  •  粉色の甜心
    2020-12-28 20:24

    You could move /usr/bin/make to /usr/bin/make_orig and make /usr/bin/make this script:

    #!/bin/sh
    
    /usr/bin/make_orig -j 8 $@
    

    Be sure to run chmod +x /usr/bin/make.

    Try this method if the simpler method in my other answer doesn't work. This method isn't as safe and is a bit of a kludge.

提交回复
热议问题