FOO = bar bazBackslashes can be used to continue lines:
FOO = \ bar \ bazA variable substitution looks like this:
$(FOO)A typical use of variables would be something like:
TCL_FILES = main.tcl update.tcl parse.tcl tclIndex: $(TCL_FILES) auto_mkindex [pwd] $^When tclmake processes a rule or a command, it substitutes variable definitions wherever possible. In this example, the effect is exactly the same as for the rule in the Introduction. The variable $^ stands for all the dependencies of the rule -- see Commands.
Variables are defined recursively, as in make. For example, in the following,
FOO = $(BAR) foo! BAR = ohthe value of FOO will be "oh foo!".
Environment variables can be referenced in the same way. A variable defined in a makefile or on the command line will override the value given by the environment. tclmake can also read variable definitions from regular makefiles, with a command such as
use makefile
tclmake defines some variables automatically:
tclmake does not support non-recursively-defined variables, as in the := definitions of GNU make.