Author: hpoussin
Date: Mon Nov 5 18:57:06 2007
New Revision: 30181
URL:
http://svn.reactos.org/svn/reactos?rev=30181&view=rev
Log:
Add a Module argument to GetObjectFilename()
Fix a typo when a define in incorrectly overridden
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 Nov 5 18:57:06 2007
@@ -395,7 +395,7 @@
for ( i = 0; i < compilationUnits.size (); i++ )
{
CompilationUnit& compilationUnit = *compilationUnits[i];
- const FileLocation *objectFilename = GetObjectFilename ( compilationUnit.GetFilename
(), NULL );
+ const FileLocation *objectFilename = GetObjectFilename ( compilationUnit.GetFilename
(), importedModule, NULL );
if ( GetExtension ( *objectFilename ) == ".h" )
{
dep += ssprintf ( " $(%s_HEADERS)", importedModule.name.c_str () );
@@ -500,6 +500,7 @@
const FileLocation*
MingwModuleHandler::GetObjectFilename (
const FileLocation* sourceFile,
+ const Module& module,
string_list* pclean_files ) const
{
DirectoryLocation destination_directory;
@@ -621,7 +622,7 @@
{
if ( objectFilenames.size () > 0 )
objectFilenames += " ";
- objectFilenames += backend->GetFullName ( *GetObjectFilename (
compilationUnits[i]->GetFilename (), NULL ) );
+ objectFilenames += backend->GetFullName ( *GetObjectFilename (
compilationUnits[i]->GetFilename (), module, NULL ) );
}
return objectFilenames;
}
@@ -825,11 +826,11 @@
continue;
if ( !define.overridable )
{
- throw InvalidOperationException ( define.node->location.c_str (),
+ throw InvalidOperationException ( (*last_define)->node->location.c_str (),
0,
"Invalid override of define '%s',
already defined at %s",
define.name.c_str (),
- (*last_define)->node->location.c_str () );
+ define.node->location.c_str () );
}
if ( backend->configuration.Verbose )
printf("%s: Overriding '%s' already defined at %s\n",
@@ -1033,7 +1034,7 @@
fprintf ( fMakefile,
"%s := %s $(%s)\n",
objectsMacro.c_str(),
- backend->GetFullName ( *GetObjectFilename ( compilationUnit.GetFilename (), NULL
) ).c_str (),
+ backend->GetFullName ( *GetObjectFilename ( compilationUnit.GetFilename (),
module, NULL ) ).c_str (),
objectsMacro.c_str() );
}
}
@@ -1047,7 +1048,7 @@
CompilationUnit& compilationUnit = *compilationUnits[i];
if ( !compilationUnit.IsFirstFile () )
{
- const FileLocation *objectFilename = GetObjectFilename ( compilationUnit.GetFilename
(), NULL );
+ const FileLocation *objectFilename = GetObjectFilename ( compilationUnit.GetFilename
(), module, NULL );
if ( GetExtension ( *objectFilename ) == ".h" )
headers.push_back ( objectFilename );
else
@@ -1110,7 +1111,7 @@
fMakefile,
"%s += %s\n",
objectsMacro.c_str(),
- backend->GetFullName ( *GetObjectFilename (
sourceCompilationUnits[i]->GetFilename (), NULL ) ).c_str () );
+ backend->GetFullName ( *GetObjectFilename (
sourceCompilationUnits[i]->GetFilename (), module, NULL ) ).c_str () );
}
CleanupCompilationUnitVector ( sourceCompilationUnits );
}
@@ -1144,7 +1145,7 @@
dependencies += " " + NormalizeFilename ( module.xmlbuildFile );
const FileLocation *objectFilename = GetObjectFilename (
- sourceFile, &clean_files );
+ sourceFile, module, &clean_files );
fprintf ( fMakefile,
"%s: %s | %s\n",
backend->GetFullName ( *objectFilename ).c_str (),
@@ -1167,7 +1168,7 @@
dependencies += " " + NormalizeFilename ( module.xmlbuildFile );
const FileLocation *objectFilename = GetObjectFilename (
- sourceFile, &clean_files );
+ sourceFile, module, &clean_files );
fprintf ( fMakefile,
"%s: %s | %s\n",
backend->GetFullName ( *objectFilename ).c_str (),
@@ -1189,7 +1190,7 @@
dependencies += " " + NormalizeFilename ( module.xmlbuildFile );
const FileLocation *objectFilename = GetObjectFilename (
- sourceFile, &clean_files );
+ sourceFile, module, &clean_files );
fprintf ( fMakefile,
"%s: %s | %s\n",
backend->GetFullName ( *objectFilename ).c_str (),
@@ -1210,7 +1211,7 @@
string dependencies = backend->GetFullName ( *sourceFile );
dependencies += " " + NormalizeFilename ( module.xmlbuildFile );
- const FileLocation *objectFilename = GetObjectFilename ( sourceFile, &clean_files
);
+ const FileLocation *objectFilename = GetObjectFilename ( sourceFile, module,
&clean_files );
string sourceFilenamePart = module.name + "." + ReplaceExtension (
sourceFile->name, "" );
FileLocation rciFilename ( TemporaryDirectory,
@@ -1642,7 +1643,7 @@
for ( size_t i = 0; i < data.compilationUnits.size (); i++ )
{
CompilationUnit& compilationUnit = *data.compilationUnits[i];
- objectFiles.push_back ( *GetObjectFilename ( compilationUnit.GetFilename (), NULL ) );
+ objectFiles.push_back ( *GetObjectFilename ( compilationUnit.GetFilename (), module,
NULL ) );
}
}
@@ -1819,7 +1820,7 @@
for ( i = 0; i < compilationUnits.size (); i++ )
{
CompilationUnit& compilationUnit = *compilationUnits[i];
- const FileLocation *objectFilename = GetObjectFilename ( compilationUnit.GetFilename
(), NULL );
+ const FileLocation *objectFilename = GetObjectFilename ( compilationUnit.GetFilename
(), module, NULL );
if ( GetExtension ( *objectFilename ) == ".h" )
{
moduleDependencies = ssprintf ( " $(%s_HEADERS)", module.name.c_str () );
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 Nov 5 18:57:06 2007
@@ -97,6 +97,7 @@
bool includeGeneratedFiles ) const;
void GetSourceFilenamesWithoutGeneratedFiles ( std::vector<FileLocation>& list
) const;
const FileLocation* GetObjectFilename ( const FileLocation* sourceFile,
+ const Module& module,
string_list* pclean_files ) const;
std::string GetObjectFilenames ();