2016-01-11 41 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);