Expand variables in all target args

This commit is contained in:
Sebastien Barre 2001-11-08 09:16:32 -05:00
parent 32e9510d55
commit 229b9064d1
1 changed files with 8 additions and 2 deletions

View File

@ -50,14 +50,20 @@ bool cmAddDependenciesCommand::InitialPass(std::vector<std::string> const& args)
return false;
}
std::string target_name = args[0];
m_Makefile->ExpandVariablesInString(target_name);
cmTargets &tgts = m_Makefile->GetTargets();
if (tgts.find(args[0]) != tgts.end())
if (tgts.find(target_name) != tgts.end())
{
std::vector<std::string>::const_iterator s = args.begin();
++s;
std::string depend_target;
for (; s != args.end(); ++s)
{
tgts[args[0]].AddUtility(s->c_str());
depend_target = *s;
m_Makefile->ExpandVariablesInString(depend_target);
tgts[target_name].AddUtility(depend_target.c_str());
}
}