aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/fileinfo.h
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.h
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.h')
-rw-r--r--tools/mhmake/src/fileinfo.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/mhmake/src/fileinfo.h b/tools/mhmake/src/fileinfo.h
index 227ba5e1f..a6606b294 100644
--- a/tools/mhmake/src/fileinfo.h
+++ b/tools/mhmake/src/fileinfo.h
@@ -49,6 +49,7 @@ extern bool g_CheckCircularDeps;
extern bool g_ForceAutoDepRescan;
extern bool g_PrintLexYacc;
extern bool g_Clean;
+extern bool g_StopCompiling;
extern bool g_PrintMultipleDefinedRules;
extern const string g_EmptyString;
@@ -58,6 +59,14 @@ extern const string g_QuoteString;
string QuoteFileName(const string &Filename);
string UnquoteFileName(const string &Filename);
+template<typename T>
+inline string stringify(const T& x)
+{
+ ostringstream o;
+ o << x;
+ return o.str();
+}
+
#define TIMESAFETY 3
class mh_time
{
@@ -196,7 +205,7 @@ public:
string GetName() const;
bool IsDir() const;
- void DumpErrorMessageDuplicateRule(const refptr<rule> &pRule);
+ string GetErrorMessageDuplicateRule(const refptr<rule> &pRule);
void SetRule(refptr<rule> &pRule)
{
@@ -222,12 +231,11 @@ public:
{
if (*m_pRule!=*pRule)
{
- DumpErrorMessageDuplicateRule(pRule);
- throw(1);
+ throw(GetErrorMessageDuplicateRule(pRule));
}
else if (g_PrintMultipleDefinedRules)
{
- DumpErrorMessageDuplicateRule(pRule);
+ cerr<<GetErrorMessageDuplicateRule(pRule);
}
}
#endif