【发布时间】:2018-02-19 10:11:18
【问题描述】:
我想在 (GNU) 生成文件中添加一个快速检查,它可以提醒用户-j/--jobs(并行生成)的可用性。也就是说,像
$ make
TIP: this will build faster if you use use "make -j"
Building ..
$ make -j
Building in parallel ..
如何确定执行 Makefile 时的并行作业数?
这里有个窍门 http://blog.jgc.org/2015/03/gnu-make-insanity-finding-value-of-j.html
以及对 GNU Make 的建议更改 https://github.com/esantoro/make/commit/b0334e7f3009dc58dbc8e6e6fdec94711537fb3b
但也许有一些更新和/或更简单的东西。
【问题讨论】: