From b6e46036afc783ff8217b26be8a01da12a32a8f3 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 2 Feb 2011 08:58:08 +0000 Subject: Solved problem when running python commands and spaces in paths --- tools/mhmake/src/build.cpp | 14 +++++--------- tools/mhmake/src/util.h | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'tools') diff --git a/tools/mhmake/src/build.cpp b/tools/mhmake/src/build.cpp index 36fdefb3d..8737bb268 100644 --- a/tools/mhmake/src/build.cpp +++ b/tools/mhmake/src/build.cpp @@ -683,7 +683,7 @@ string mhmakefileparser::GetFullCommand(string Command) if (!FullCommand.empty()) { Found=true; - Command=FullCommand; + Command=QuoteFileName(FullCommand); } } else @@ -700,7 +700,7 @@ string mhmakefileparser::GetFullCommand(string Command) if (!FullCommand.empty()) { Found=true; - Command=FullCommand; + Command=QuoteFileName(FullCommand); } else { @@ -708,7 +708,7 @@ string mhmakefileparser::GetFullCommand(string Command) if (!FullCommand.empty()) { Found=true; - Command=GetPythonExe()+QuoteFileName(FullCommand); + Command=GetPythonExe()+QuoteFileName(FullCommand); } } } @@ -771,7 +771,7 @@ mh_pid_t mhmakefileparser::OsExeCommand(const string &Command, const string &Par string tmpCommand=Command.substr(ComSpec.size(),Command.size()); FullCommandLine=ComSpec; - string ComspecCommandLine=QuoteFileName(tmpCommand)+Params; + string ComspecCommandLine=tmpCommand+Params; int NextBegin=0; int EndPos=0; CommandSep(ComspecCommandLine,EndPos,NextBegin); @@ -806,11 +806,7 @@ mh_pid_t mhmakefileparser::OsExeCommand(const string &Command, const string &Par } else { - const string PythonExe=GetPythonExe(); - if (!(Command.substr(0,PythonExe.size())==PythonExe)) - FullCommandLine=QuoteFileName(Command)+Params; - else - FullCommandLine=Command+Params; + FullCommandLine=Command+Params; } char *pFullCommand=new char[FullCommandLine.length()+1]; strcpy(pFullCommand,FullCommandLine.c_str()); diff --git a/tools/mhmake/src/util.h b/tools/mhmake/src/util.h index aba9ec649..8755d4485 100644 --- a/tools/mhmake/src/util.h +++ b/tools/mhmake/src/util.h @@ -50,7 +50,7 @@ #define PLATFORM "linux" #endif -#define MHMAKEVER "2.4.1" +#define MHMAKEVER "2.4.2" class makecommand { -- cgit v1.2.3