什么是gnu make中的$(-*-command-variables-*-)) [英] what is $(-*-command-variables-*-)) in gnu make

查看:61
本文介绍了什么是gnu make中的$(-*-command-variables-*-))的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目makefile中,有一个名为- -command-variables--"的变量.我可以从上下文中猜测其含义,但我想进一步了解- -command-variables--".谷歌和GNU制作手册没有结果.

In my project makefile, there is a variable named "--command-variables--". I could guess its meaning from the context, but I want to know more about "--command-variables--". No result from google and GNU make manual.

这是我的测试文件,

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

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

When I type make test=Makefile, it prints out:

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

我发现此变量位于.VARIABLES变量中,但在GNU手册中找不到.我使用的make版本是GNU make 3.81.谁能告诉我这些变量在哪里定义或更多关于这些变量的定义?谢谢.

I found this variables is in .VARIABLES variable, but I can not find it in GNU manual. The version of make I used is GNU make 3.81. Can anyone tell me where does this variables defined in or more about these variables? Thank you.

推荐答案

这是main.c中定义的一个内部变量(第1344行),

It's one internal variable defined in main.c (line 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);

这篇关于什么是gnu make中的$(-*-command-variables-*-))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆