aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/mhmakelexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mhmake/src/mhmakelexer.l')
-rw-r--r--tools/mhmake/src/mhmakelexer.l5
1 files changed, 5 insertions, 0 deletions
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")
{