Next: , Up: Data   [Contents][Index]


4.7.1 Print variable info (‘print’)

One way to expand variables the print command (abbreviated p). However a more versatile print command is x; it can print arbitrary string expands which of course includes variable.

print variable-name

Use print to display GNU Remake’s variables. As such, variable names should not be preceded with a dollar sign.

remake<0> print SHELL
Makefile:168 (origin: makefile) SHELL = /bin/sh

/tmp/remake/Makefile:243: Makefile.in
remake<1> print $MAKE   # don't use $
Can't find variable $MAKE

/tmp/remake/Makefile:243: Makefile.in
remake<1> print shell   # note case is significant
Can't find variable shell
print
p

If you omit variable, the GNU Make debugger displays the last expression again.