gittup/tup — pull request #58 by zjg (2012-03-26 17:29:05+00:00)
Title: Node variables

Node variables are variables that refer to tup nodes rather than just containing a string.

Node variables can be used in places where a specific file is needed, so that you can be sure the correct file is used without having to worry about the path issues that crop up when using $(TUP_CWD) and chained Tupfile inclusions.

#### Use Case
An example use case is a library that is built in one subdir and then used in many other places across the project. The library has a 'lib.tup' file that defines the include paths, link flags, etc needed in order to use the library. This lib.tup file needs to be included in the Tupfiles where the library needs to be used. By making a %-variable that refers to this lib.tup file, it can be included correctly everywhere.
(TUP_CWD stops working for this use case when the lib.tup file is included in other library.tup files, which are then included in Tupfiles.)

#### Note
This isn't quite ready to be pulled over, I'm just starting the request because it provides a nice spot for discussion.

#### Todo
- man page
- list of nodes

#### To discuss & then do
- different syntax ('%=' and '%+=' are kind of weird)
- any other places where node variables should be allowed
- any places where node variables currently work but shouldn't