1

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.

Here is my test makefile,

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

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

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

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.

akond
  • 15,865
  • 4
  • 35
  • 55

1 Answers1

1

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);
Eric
  • 471
  • 4
  • 9