aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mhmake/src/util.cpp')
-rw-r--r--tools/mhmake/src/util.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/mhmake/src/util.cpp b/tools/mhmake/src/util.cpp
index 9b34b41ea..46f9b9edb 100644
--- a/tools/mhmake/src/util.cpp
+++ b/tools/mhmake/src/util.cpp
@@ -746,6 +746,23 @@ void loadedmakefile::LoadMakefile()
}
}
+/*****************************************************************************/
+bool MakeDirs(const fileinfo *pDir)
+{
+ fileinfo *pParentDir=pDir->GetDir();
+ if (!pParentDir->GetDate().DoesExist())
+ { /* First make parent dirs */
+ if (!MakeDirs(pParentDir))
+ return false;
+ }
+ if (!pDir->GetDate().DoesExist())
+ { /* Create directory */
+ if (-1==mkdir(pDir->GetFullFileName().c_str(),S_IRWXU))
+ return false;
+ }
+ return true;
+}
+
#ifdef _DEBUG
///////////////////////////////////////////////////////////////////////////////
void DumpVarsAndRules()