From 875b16dac62dc18fc11fb6b63ed60cf39bb68559 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Mon, 25 Jun 2007 17:56:54 +0000 Subject: [PATCH] Fix the build system, accidently broke it with r27269 svn path=/trunk/; revision=27276 --- reactos/ReactOS.rbuild | 2 +- .../dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild | 1 + reactos/dll/win32/ole32/ole32.rbuild | 1 + .../rbuild/backend/mingw/modulehandler.cpp | 17 +++++++++--- reactos/tools/rbuild/include.cpp | 27 ++++++++++++------- reactos/tools/rbuild/rbuild.h | 2 +- 6 files changed, 34 insertions(+), 16 deletions(-) diff --git a/reactos/ReactOS.rbuild b/reactos/ReactOS.rbuild index 840905d6388..11961b2624e 100644 --- a/reactos/ReactOS.rbuild +++ b/reactos/ReactOS.rbuild @@ -62,7 +62,7 @@ . include include/psdk - include/psdk + include/psdk include/dxsdk include/crt include/ddk diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild b/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild index 7a200838719..7deba7ee705 100644 --- a/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild +++ b/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild @@ -2,6 +2,7 @@ . include/reactos/wine + include/reactos/wine diff --git a/reactos/dll/win32/ole32/ole32.rbuild b/reactos/dll/win32/ole32/ole32.rbuild index a178b681825..e44265b70da 100644 --- a/reactos/dll/win32/ole32/ole32.rbuild +++ b/reactos/dll/win32/ole32/ole32.rbuild @@ -2,6 +2,7 @@ . + . include/reactos/wine diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp index bb345b8cb57..fc538efd8a5 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp @@ -684,9 +684,9 @@ MingwModuleHandler::GenerateGccIncludeParametersFromVector ( const vector 0 ) parameters += " "; - if ( include.baseValue == "__intermediate" ) + if ( include.root == "intermediate" ) path_prefix = backend->intermediateDirectory->name + cSep; - else if (include.baseValue == "__output" ) + else if (include.root == "output" ) path_prefix = backend->outputDirectory->name + cSep; else path_prefix = ""; @@ -797,7 +797,7 @@ MingwModuleHandler::GenerateMacro ( for ( i = 0; i < data.includes.size(); i++ ) { const Include& include = *data.includes[i]; - string includeDirectory; + string includeDirectory, path_prefix; if ( include.baseModule != NULL && ( include.baseModule->type == RpcServer || include.baseModule->type == RpcClient || @@ -806,9 +806,18 @@ MingwModuleHandler::GenerateMacro ( backend->intermediateDirectory ); else includeDirectory = include.directory; + + if ( include.root == "intermediate" ) + path_prefix = backend->intermediateDirectory->name + cSep; + else if (include.root == "output" ) + path_prefix = backend->outputDirectory->name + cSep; + else + path_prefix = ""; + fprintf ( fMakefile, - " -I%s", + " -I%s%s", + path_prefix.c_str(), includeDirectory.c_str() ); } for ( i = 0; i < data.defines.size(); i++ ) diff --git a/reactos/tools/rbuild/include.cpp b/reactos/tools/rbuild/include.cpp index 0c9ab39d14d..705ef151488 100644 --- a/reactos/tools/rbuild/include.cpp +++ b/reactos/tools/rbuild/include.cpp @@ -52,7 +52,6 @@ Include::Include ( const Project& project, { this->directory = NormalizeFilename ( basePath + sSep + directory ); this->basePath = NormalizeFilename ( basePath ); - this->baseValue = basePath; } Include::~Include () @@ -67,18 +66,12 @@ Include::ProcessXML() if ( att ) { bool referenceResolved = false; - baseValue = att->value; if ( !module ) { - if ( att->value == "__intermediate" || att->value == "__output" ) - referenceResolved = true; - else - { - throw XMLInvalidBuildFileException ( - node->location, - "'base' attribute illegal from global " ); - } + throw XMLInvalidBuildFileException ( + node->location, + "'base' attribute illegal from global " ); } if ( !referenceResolved ) @@ -109,4 +102,18 @@ Include::ProcessXML() } else directory = NormalizeFilename ( node->value ); + + att = node->GetAttribute ( "root", false ); + if ( att ) + { + if ( att->value != "intermediate" && att->value != "output" ) + { + throw InvalidAttributeValueException ( + node->location, + "root", + att->value ); + } + + root = att->value; + } } diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h index e4f6ab04c37..b13c96ef99a 100644 --- a/reactos/tools/rbuild/rbuild.h +++ b/reactos/tools/rbuild/rbuild.h @@ -366,7 +366,7 @@ public: const Module* baseModule; std::string directory; std::string basePath; - std::string baseValue; + std::string root; Include ( const Project& project, const XMLElement* includeNode );