aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/fileinfo.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-02 09:28:00 +0000
committermarha <marha@users.sourceforge.net>2009-10-02 09:28:00 +0000
commit516cdec4894096305f5002b922ba02d49cb3e816 (patch)
treee34bc97b00f6acf17b33877efb7f5ffa543d2881 /tools/mhmake/src/fileinfo.cpp
parent945c71554aa1866a5286dd4b8f5b199dd7af9be9 (diff)
downloadvcxsrv-516cdec4894096305f5002b922ba02d49cb3e816.tar.gz
vcxsrv-516cdec4894096305f5002b922ba02d49cb3e816.tar.bz2
vcxsrv-516cdec4894096305f5002b922ba02d49cb3e816.zip
Optimised auto dependency generation
Added control c handler in windows Now throw string exceptions instead of integer exceptions.
Diffstat (limited to 'tools/mhmake/src/fileinfo.cpp')
-rw-r--r--tools/mhmake/src/fileinfo.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/mhmake/src/fileinfo.cpp b/tools/mhmake/src/fileinfo.cpp
index b79d51678..6ea9c158e 100644
--- a/tools/mhmake/src/fileinfo.cpp
+++ b/tools/mhmake/src/fileinfo.cpp
@@ -174,12 +174,12 @@ string fileinfo::GetPrerequisits() const
// Build a string with all prerequisits, but make sure that every dependency
// is only in there once (we do this be building a set in parallel
vector< refptr<fileinfo> >::const_iterator DepIt=m_Deps.begin();
- set< refptr<fileinfo> > Deps;
+ deps_t Deps;
bool first=true;
string Ret=g_EmptyString;
while (DepIt!=m_Deps.end())
{
- set< refptr<fileinfo> >::iterator pFound=Deps.find(*DepIt);
+ deps_t::iterator pFound=Deps.find(*DepIt);
if (pFound==Deps.end())
{
if (first)
@@ -228,24 +228,26 @@ bool fileinfo::IsAutoDepExtention(void) const
#ifdef _DEBUG
///////////////////////////////////////////////////////////////////////////////
-void fileinfo::DumpErrorMessageDuplicateRule(const refptr<rule>&pRule)
+string fileinfo::GetErrorMessageDuplicateRule(const refptr<rule>&pRule)
{
- cerr << GetQuotedFullFileName() << ": rule is defined multiple times\n";
- cerr << "First ("<<m_pRule->GetMakefile()->GetMakeDir()->GetQuotedFullFileName()<<") :\n";
+ string Ret;
+ Ret = GetQuotedFullFileName() + ": rule is defined multiple times\n";
+ Ret += "First (" + m_pRule->GetMakefile()->GetMakeDir()->GetQuotedFullFileName() + ") :\n";
vector<string>::const_iterator It=m_pRule->GetCommands().begin();
while (It!=m_pRule->GetCommands().end())
{
- cerr << " " << m_pRule->GetMakefile()->ExpandExpression(*It) << endl;
+ Ret+= " " + m_pRule->GetMakefile()->ExpandExpression(*It) + "\n";
It++;
}
- cerr << "Second ("<<pRule->GetMakefile()->GetMakeDir()->GetQuotedFullFileName()<<") :\n";
+ Ret += "Second (" + pRule->GetMakefile()->GetMakeDir()->GetQuotedFullFileName() + ") :\n";
It=pRule->GetCommands().begin();
while (It!=pRule->GetCommands().end())
{
- cerr << " " << pRule->GetMakefile()->ExpandExpression(*It) << endl;
+ Ret += " " + pRule->GetMakefile()->ExpandExpression(*It) +"\n";
It++;
}
+ return Ret;
}
#endif