Redesign variable expansion policy
Rethink the policy of variable expansion. It may be nice to design the expansion policy that will be more useful to the user, that is, using the braces may free user from keeping the order of variable setting. If the expansion happens at the last possible moment - possibly when the database is being processed - then it can refer to variables that are declared later, as well as the [def] execution may happen at the moment when it would return the most appropriate value.
It would be confusing for the user if variables are expanded different way when passing directly and different way when passed in {}. So, variable expansion should be done the same way, that is, at the time of passing the argument.
There can be however a change in the method how "defs" (symbols defined by "pdef") are expanded, and these can be expanded at best at the latest possible time. The very best way to expand them would be to provide the original pdef declaration to the generated Makefile.tcl so that this is expanded exactly at the last possible moment.