The problem here is that if I update a secondary variable definition (i.e. not the default one) in the Global project, the update does NOT automatically carry through to the targets stored in my child projects. If variable set and target are edited in the same place, the Flare analyzer works its magic to update the target definition; but if they are not, the definition does not change even when the variable set is imported. I have to go through every target in multiple projects and update them, which almost defeats the purpose of having alternative variable definitions at all.
With some poking around, I found that the issue lies in how secondary variable definitions are encoded in the XML for targets. If the target in question only uses the defaults for variables, the XML is simply <Variables></Variables>. So at build time Flare goes and checks the default variable definitions and inserts them.
But if you use the dropdown menu in the Target Editor to select a secondary variable definition, you get this:
Code: Select all
<Variables>
<Variable name="ProductA">ProductA Alternative Name</Variable>
</Variables>
Ideally I would like the XML code in the target to look for the definition in the variable set rather than a hard-coded name (e.g. <variable name="productA" definition="2">), and I've submitted a feature request to that effect. But in case that isn't forthcoming, I'd like an automated way of keeping all of these targets synchronised with the variable set.
I toyed with the idea of using XInclude and writing some kind of pre-build command to take the variable definitions from somewhere else (e.g. a target in the Global project) and overwrite the current target before it builds, but I think that's probably a little beyond my capacity. Does anyone have any other suggestions along those lines?