diff options
author | marha <marha@users.sourceforge.net> | 2012-03-12 11:51:16 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-12 11:51:16 +0100 |
commit | 96276c847a5c266f9f51f3ec4ece8fe3f1381c96 (patch) | |
tree | cced2f3df95ab841e860e39413203c93aebb6c07 /tools/mhmake/src/functions.cpp | |
parent | 2b6ab5ff6c32e8bda9f50e38d12367502d3dd32c (diff) | |
download | vcxsrv-96276c847a5c266f9f51f3ec4ece8fe3f1381c96.tar.gz vcxsrv-96276c847a5c266f9f51f3ec4ece8fe3f1381c96.tar.bz2 vcxsrv-96276c847a5c266f9f51f3ec4ece8fe3f1381c96.zip |
Made creation of temp files interprocess safe in windows
Fixes for 64-bit compilation
Implemented realpath function
Improved auodep scanning
Solved a problem in dependency scanning
Diffstat (limited to 'tools/mhmake/src/functions.cpp')
-rw-r--r-- | tools/mhmake/src/functions.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/mhmake/src/functions.cpp b/tools/mhmake/src/functions.cpp index 1071d2604..7393035cf 100644 --- a/tools/mhmake/src/functions.cpp +++ b/tools/mhmake/src/functions.cpp @@ -41,6 +41,7 @@ funcdef mhmakefileparser::m_FunctionsDef[]= { ,{"dir", &mhmakefileparser::f_dir}
,{"shell", &mhmakefileparser::f_shell}
,{"relpath", &mhmakefileparser::f_relpath}
+ ,{"realpath", &mhmakefileparser::f_realpath}
,{"toupper", &mhmakefileparser::f_toupper}
,{"tolower", &mhmakefileparser::f_tolower}
,{"exist", &mhmakefileparser::f_exist}
@@ -829,6 +830,24 @@ string mhmakefileparser::f_relpath(const string & FileNames) const }
///////////////////////////////////////////////////////////////////////////////
+static string realpath(const string &FileName,void *pvDir)
+{
+ const fileinfo *pDir=*(const fileinfo **)pvDir;
+ const fileinfo *pPath=GetFileInfo(FileName,pDir);
+ if (pPath->Exists())
+ return pPath->GetQuotedFullFileName();
+ else
+ return "";
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Make a path name relative to the current directory
+string mhmakefileparser::f_realpath(const string & FileNames) const
+{
+ return IterList(ExpandExpression(FileNames),realpath,(void*)&m_MakeDir);
+}
+
+///////////////////////////////////////////////////////////////////////////////
static string makeupper(const string &FileName,void *)
{
string Ret=FileName;
|