diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index cf4d39dcd10..6224823348c 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -2,6 +2,7 @@ #include "../../pch.h" #include "mingw.h" +#include using std::string; using std::vector; @@ -166,8 +167,10 @@ MingwBackend::GenerateGlobalVariables () fprintf ( fMakefile, "gcc = gcc\n" ); fprintf ( fMakefile, "ld = ld\n" ); fprintf ( fMakefile, "ar = ar\n" ); + fprintf ( fMakefile, "mkdir = tools%crmkdir\n", CSEP ); fprintf ( fMakefile, "dlltool = dlltool\n" ); fprintf ( fMakefile, "windres = windres\n" ); + fprintf ( fMakefile, "NUL=NUL\n" ); fprintf ( fMakefile, "winebuild = tools" SSEP "winebuild" SSEP "winebuild\n" ); fprintf ( fMakefile, "\n" ); GenerateGlobalCFlagsAndProperties ( @@ -188,7 +191,7 @@ MingwBackend::GenerateGlobalVariables () void MingwBackend::GenerateAllTarget () { - fprintf ( fMakefile, "all:" ); + fprintf ( fMakefile, "all:" ); for ( size_t i = 0; i < ProjectNode.modules.size (); i++ ) { Module& module = *ProjectNode.modules[i]; @@ -206,6 +209,7 @@ MingwBackend::ProcessModule ( Module& module ) module.node.location, module.type ); h->Process ( module ); + h->GenerateDirectoryTargets (); } string diff --git a/reactos/tools/rbuild/backend/mingw/mingw.h b/reactos/tools/rbuild/backend/mingw/mingw.h index 04bab3e4fd6..d14b4cffbc9 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.h +++ b/reactos/tools/rbuild/backend/mingw/mingw.h @@ -23,6 +23,7 @@ private: const std::vector& defines, const std::vector& ifs ); std::string GenerateProjectLFLAGS (); + void GenerateDirectoryTargets (); void GenerateGlobalVariables (); void GenerateAllTarget (); FILE* fMakefile; diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h index 66d76c6683b..abed79844aa 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.h +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h @@ -16,9 +16,12 @@ public: static MingwModuleHandler* LookupHandler ( const std::string& location, ModuleType moduletype_ ); virtual void Process ( const Module& module ) = 0; + void GenerateDirectoryTargets () const; protected: + const std::string &PassThruCacheDirectory ( const std::string &f ) const; std::string GetWorkingDirectory () const; + std::string GetDirectory (const std::string& filename ) const; std::string GetExtension ( const std::string& filename ) const; std::string GetBasename ( const std::string& filename ) const; std::string ReplaceExtension ( const std::string& filename, @@ -51,6 +54,7 @@ protected: std::string GetDefinitionDependencies ( const Module& module ) const; std::string GetLinkingDependencies ( const Module& module ) const; static FILE* fMakefile; + static std::set directory_set; private: std::string ConcatenatePaths ( const std::string& path1, const std::string& path2 ) const; diff --git a/reactos/tools/rbuild/pch.h b/reactos/tools/rbuild/pch.h index 0cda23145b0..594358412ea 100644 --- a/reactos/tools/rbuild/pch.h +++ b/reactos/tools/rbuild/pch.h @@ -10,6 +10,7 @@ #include #include #include +#include #include