aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/util.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-27 13:44:12 +0000
committermarha <marha@users.sourceforge.net>2011-01-27 13:44:12 +0000
commit11903063211dc368d03f52e090e52ab18ebe3f47 (patch)
tree71991c8ffd98ed31690190b37f39cfc6244b6595 /tools/mhmake/src/util.cpp
parent59e0042680b01d7e3cf69104921f151ceee13df4 (diff)
downloadvcxsrv-11903063211dc368d03f52e090e52ab18ebe3f47.tar.gz
vcxsrv-11903063211dc368d03f52e090e52ab18ebe3f47.tar.bz2
vcxsrv-11903063211dc368d03f52e090e52ab18ebe3f47.zip
Implemented mkdir as an internal command
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()