aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/mhmake/src/mhmakefileparser.h2
-rw-r--r--tools/mhmake/src/mhmakelexer.l5
2 files changed, 6 insertions, 1 deletions
diff --git a/tools/mhmake/src/mhmakefileparser.h b/tools/mhmake/src/mhmakefileparser.h
index 73d3979dc..1efb37c39 100644
--- a/tools/mhmake/src/mhmakefileparser.h
+++ b/tools/mhmake/src/mhmakefileparser.h
@@ -104,7 +104,7 @@ protected:
static mh_time_t m_sBuildTime;
private:
- string mhmakefileparser::ResolveExpression(const string &InExpr,string &Rest) const;
+ string ResolveExpression(const string &InExpr,string &Rest) const;
public:
#ifdef _DEBUG
diff --git a/tools/mhmake/src/mhmakelexer.l b/tools/mhmake/src/mhmakelexer.l
index 59aaad0ca..8796e70c4 100644
--- a/tools/mhmake/src/mhmakelexer.l
+++ b/tools/mhmake/src/mhmakelexer.l
@@ -447,6 +447,11 @@ load_makefile {
<IF>[ \t\r]*[a-zA-Z0-9_]+[ \t\r]*\n {
unput( '\n' );
m_IndentStack.push(0);
+#ifndef WIN32
+ int lastidx=strlen((const char *)yytext)-1;
+ if (yytext[lastidx]=='\r')
+ yytext[lastidx]='\0';
+#endif
string Val=GetParser()->ExpandVar((const char *)yytext);
if (Val.empty() || Val=="0")
{