Author: hpoussin
Date: Mon Sep 24 16:53:33 2007
New Revision: 29185
URL:
http://svn.reactos.org/svn/reactos?rev=29185&view=rev
Log:
Add headers dependencies for modules which declare a .idl in their rbuild file
Modified:
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Mon Sep 24 16:53:33 2007
@@ -1364,6 +1364,7 @@
void
MingwModuleHandler::GenerateCommands (
const CompilationUnit& compilationUnit,
+ const string& extraDependencies,
const string& cc,
const string& cppc,
const string& cflagsMacro,
@@ -1376,7 +1377,7 @@
if ( extension == ".c" || extension == ".C" )
{
GenerateGccCommand ( sourceFile,
- GetCompilationUnitDependencies ( compilationUnit ),
+ GetCompilationUnitDependencies ( compilationUnit ) +
extraDependencies,
cc,
cflagsMacro );
return;
@@ -1386,7 +1387,7 @@
extension == ".cxx" || extension == ".CXX" )
{
GenerateGccCommand ( sourceFile,
- GetCompilationUnitDependencies ( compilationUnit ),
+ GetCompilationUnitDependencies ( compilationUnit ) +
extraDependencies,
cppc,
cflagsMacro );
return;
@@ -1414,7 +1415,7 @@
{
GenerateWinebuildCommands ( sourceFile );
GenerateGccCommand ( GetActualSourceFilename ( sourceFile ),
- "",
+ extraDependencies,
cc,
cflagsMacro );
return;
@@ -1696,11 +1697,24 @@
const string& widlflagsMacro )
{
size_t i;
+ string moduleDependencies;
const vector<CompilationUnit*>& compilationUnits = data.compilationUnits;
for ( i = 0; i < compilationUnits.size (); i++ )
{
+ CompilationUnit& compilationUnit = *compilationUnits[i];
+ const FileLocation *objectFilename = GetObjectFilename ( compilationUnit.GetFilename
(), NULL );
+ if ( GetExtension ( *objectFilename ) == ".h" )
+ {
+ moduleDependencies = ssprintf ( " $(%s_HEADERS)", module.name.c_str () );
+ break;
+ }
+ }
+
+ for ( i = 0; i < compilationUnits.size (); i++ )
+ {
GenerateCommands ( *compilationUnits[i],
+ moduleDependencies,
cc,
cppc,
cflagsMacro,
@@ -1728,6 +1742,7 @@
for ( i = 0; i < sourceCompilationUnits.size (); i++ )
{
GenerateCommands ( *sourceCompilationUnits[i],
+ moduleDependencies,
cc,
cppc,
cflagsMacro,
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h Mon Sep 24 16:53:33 2007
@@ -174,6 +174,7 @@
void GenerateWidlCommands ( const CompilationUnit& compilationUnit,
const std::string& widlflagsMacro );
void GenerateCommands ( const CompilationUnit& compilationUnit,
+ const std::string& extraDependencies,
const std::string& cc,
const std::string& cppc,
const std::string& cflagsMacro,