开发者

Is there a way to get the -j parameter from a make invocation?

Lets say I call:

make -j 5

Is there a way, within my Makefile to get the -j parameter ?

My goal is to call scons from a Makefile a to keep the ability to use several jobs to fasten compilation.

Something like:

# The Makefile
all:
    scons -j ${GET_J_PARAMETER}

Thank you.

Foot note: I know I should better call scons directly but some of the develo开发者_如何学Gopers where I work have been typing make for almost ten years and it seems impossible for them to type anything else to build their libraries...


I think the MAKEFLAGS contains that information.

Read more about it here GNU Make

Section 7.3 explains how to test for a specific parameter.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜