|
|
@@ -1173,6 +1173,7 @@ void cmMakefile::ExpandVariables()
|
|
|
|
|
|
void cmMakefile::ExpandVariablesInCustomCommands()
|
|
|
{
|
|
|
+ // do source files
|
|
|
for(std::vector<cmSourceFile*>::iterator i = m_SourceFiles.begin();
|
|
|
i != m_SourceFiles.end(); ++i)
|
|
|
{
|
|
|
@@ -1182,6 +1183,28 @@ void cmMakefile::ExpandVariablesInCustomCommands()
|
|
|
cc->ExpandVariables(*this);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // now do targets
|
|
|
+ std::vector<cmCustomCommand>::iterator ic;
|
|
|
+ for (cmTargets::iterator l = m_Targets.begin();
|
|
|
+ l != m_Targets.end(); l++)
|
|
|
+ {
|
|
|
+ for (ic = l->second.GetPreBuildCommands().begin();
|
|
|
+ ic != l->second.GetPreBuildCommands().end(); ++ic)
|
|
|
+ {
|
|
|
+ ic->ExpandVariables(*this);
|
|
|
+ }
|
|
|
+ for (ic = l->second.GetPreLinkCommands().begin();
|
|
|
+ ic != l->second.GetPreLinkCommands().end(); ++ic)
|
|
|
+ {
|
|
|
+ ic->ExpandVariables(*this);
|
|
|
+ }
|
|
|
+ for (ic = l->second.GetPostBuildCommands().begin();
|
|
|
+ ic != l->second.GetPostBuildCommands().end(); ++ic)
|
|
|
+ {
|
|
|
+ ic->ExpandVariables(*this);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
bool cmMakefile::IsOn(const char* name) const
|