本文介绍了什么-j4值用于调用make?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从一条make规则中找出make -j参数的值是什么?是否有类似环境变量的内容?例如,如果我运行:
How can I figure out, from a make rule, what is the value of the make -j argument ? Is there something like an environment variable ? For instance if I run:
make -j4 something
我希望something
规则显示4
. GNU make手册页建议在父make与其可能用于提取此信息的孩子.但是如何?
I would like the something
rule to display 4
. The GNU make manual page suggests communication between the parent make and its children which could probably be used to extract this information. But how ?
推荐答案
事实证明,这实际上并不容易.
Turns out this isn't at all easy actually.
John Graham-Cunning写了一篇有关它的完整博客文章此处.
John Graham-Cunning wrote an entire blog post about it here.
这篇关于什么-j4值用于调用make?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!