diff options
author | marha <marha@users.sourceforge.net> | 2011-01-27 13:44:12 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-27 13:44:12 +0000 |
commit | 11903063211dc368d03f52e090e52ab18ebe3f47 (patch) | |
tree | 71991c8ffd98ed31690190b37f39cfc6244b6595 /tools/mhmake/src/util.cpp | |
parent | 59e0042680b01d7e3cf69104921f151ceee13df4 (diff) | |
download | vcxsrv-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.cpp | 17 |
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()
|