aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/mhmakefileparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mhmake/src/mhmakefileparser.cpp')
-rw-r--r--tools/mhmake/src/mhmakefileparser.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/tools/mhmake/src/mhmakefileparser.cpp b/tools/mhmake/src/mhmakefileparser.cpp
index 1b1119641..a359de117 100644
--- a/tools/mhmake/src/mhmakefileparser.cpp
+++ b/tools/mhmake/src/mhmakefileparser.cpp
@@ -177,38 +177,38 @@ inline string mhmakefileparser::ExpandExpression(const string &ExprIn) const
string Expr(Ret);
Ret.clear();
- size_t i=0;
- size_t Length=Expr.size();
- string ToAdd;
- while (i<Length)
- {
- char Char=Expr[i++];
- if (Char=='$')
+ size_t i=0;
+ size_t Length=Expr.size();
+ string ToAdd;
+ while (i<Length)
{
- size_t inew=SkipMakeExpr(Expr,i);
- i++;
- if (inew>i)
- {
- ToAdd=ExpandMacro(Expr.substr(i,inew-i-1));
- i=inew;
- }
- else
- {
- // This is a single character expression
- ToAdd=ExpandMacro(string(1,Expr[i-1]));
+ char Char=Expr[i++];
+ if (Char=='$')
+ {
+ size_t inew=SkipMakeExpr(Expr,i);
+ i++;
+ if (inew>i)
+ {
+ ToAdd=ExpandMacro(Expr.substr(i,inew-i-1));
+ i=inew;
+ }
+ else
+ {
+ // This is a single character expression
+ ToAdd=ExpandMacro(string(1,Expr[i-1]));
+ }
+ if (ToAdd.find('$')!=string::npos && ToAdd.length()!=1)
+ {
+ Recurse=true;
}
- if (ToAdd.find('$')!=string::npos && ToAdd.length()!=1)
- {
- Recurse=true;
+ Ret+=ToAdd;
+ }
+ else
+ {
+ Ret+=Char;
}
- Ret+=ToAdd;
- }
- else
- {
- Ret+=Char;
}
}
- }
return Ret;
}