2016-01-11 43 views
1

在我的项目makefile中,有一个名为“ - -command-variables- - ”的变量。我可以从上下文中猜出它的含义,但我想知道更多关于“ - -command-variables- - ”。没有谷歌和GNU的手动结果。

这里是我的测试的makefile,

all: 
    $(warning $(-*-command-variables-*-)) 
    #$(warning $(.VARIABLES)) 
    #$(foreach v, $(.VARIABLES), $(info $v===>$($v))) 

当我键入make test=Makefile,它打印出:

Makefile:2: test=Makefile 
make: `all' is up to date. 

我发现这个变量是.VARIABLES可变的,但我不能找到它在GNU手册。 我使用的make版本是GNU make 3.81。 任何人都可以告诉我这些变量在这些变量中定义了多少或更多?谢谢。

+0

这是一个用户可变的。它必须在你的Makefile的某个地方设置。 – akond

回答

0

它在main.c中(线1344)所定义的一个内部变量,

/* Define an unchangeable variable with a name that no POSIX.2 
    makefile could validly use for its own variable. */ 
(void) define_variable ("-*-command-variables-*-", 23,value, o_automatic, 0);