From ed47063ec4933a51ef0f2f7d667b8178a86b6b12 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 16 Mar 2010 13:03:59 +0000 Subject: Solved problem with $(@:%blabla=%) when there are spaces in the filename --- tools/mhmake/src/mhmakefileparser.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tools/mhmake/src/mhmakefileparser.cpp') diff --git a/tools/mhmake/src/mhmakefileparser.cpp b/tools/mhmake/src/mhmakefileparser.cpp index e9d50a704..30916878e 100644 --- a/tools/mhmake/src/mhmakefileparser.cpp +++ b/tools/mhmake/src/mhmakefileparser.cpp @@ -252,7 +252,15 @@ string mhmakefileparser::ExpandMacro(const string &Expr) const string ToStr(pTo); #ifdef WIN32 if (IsFileName) - return QuoteFileName(Substitute(UnquoteFileName(ToSubst),SrcStr,ToStr)); + { + matchres Res; + string FileName(UnquoteFileName(ToSubst)); + if (PercentMatch(FileName,UnquoteFileName(SrcStr),&Res)) + { + FileName=ReplaceWithStem(UnquoteFileName(ToStr),Res.m_Stem); + } + return QuoteFileName(FileName); + } #endif return Substitute(ToSubst,SrcStr,ToStr); } -- cgit v1.2.3