ENH: slightly modified version of Alex's relative path arguments for custom commands

This commit is contained in:
Ken Martin 2005-07-08 11:51:21 -04:00
parent 6c0f018bef
commit 91730c6005
1 changed files with 39 additions and 22 deletions

View File

@ -117,36 +117,53 @@ bool cmAddCustomCommandCommand::InitialPass(std::vector<std::string> const& args
} }
else else
{ {
std::string filename;
switch (doing) switch (doing)
{ {
case doing_source: case doing_source:
source = copy;
break;
case doing_output: case doing_output:
output = copy;
break;
case doing_main_dependency:
main_dependency = copy;
break;
case doing_command:
currentLine.push_back(copy);
break;
case doing_target:
target = copy;
break;
case doing_depends:
depends.push_back(copy);
break;
case doing_outputs: case doing_outputs:
outputs.push_back(copy); if (!cmSystemTools::FileIsFullPath(copy.c_str()))
break; {
case doing_comment: filename = m_Makefile->GetStartDirectory();
comment = copy; filename += "/";
}
filename += copy;
break; break;
default: default:
this->SetError("Wrong syntax. Unknown type of argument."); break;
return false;
} }
switch (doing)
{
case doing_source:
source = filename;
break;
case doing_output:
output = filename;
break;
case doing_main_dependency:
main_dependency = copy;
break;
case doing_command:
currentLine.push_back(copy);
break;
case doing_target:
target = copy;
break;
case doing_depends:
depends.push_back(copy);
break;
case doing_outputs:
outputs.push_back(filename);
break;
case doing_comment:
comment = copy;
break;
default:
this->SetError("Wrong syntax. Unknown type of argument.");
return false;
}
} }
} }