Author: hpoussin
Date: Sun Jul 27 12:12:44 2008
New Revision: 34854
URL:
http://svn.reactos.org/svn/reactos?rev=34854&view=rev
Log:
Fix code to correctly handle first object file.
It was luckily working because first file was always conditional.
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 [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Sun Jul 27
12:12:44 2008
@@ -868,7 +868,6 @@
void
MingwModuleHandler::GenerateSourceMacros (
- const char* assignmentOperation,
const IfableData& data )
{
size_t i;
@@ -879,9 +878,8 @@
{
fprintf (
fMakefile,
- "%s %s",
- sourcesMacro.c_str (),
- assignmentOperation );
+ "%s =",
+ sourcesMacro.c_str () );
for ( i = 0; i < compilationUnits.size(); i++ )
{
CompilationUnit& compilationUnit = *compilationUnits[i];
@@ -911,10 +909,10 @@
void
MingwModuleHandler::GenerateObjectMacros (
- const char* assignmentOperation,
const IfableData& data )
{
size_t i;
+ const char* assignmentOperation = "=";
const vector<CompilationUnit*>& compilationUnits = data.compilationUnits;
vector<const FileLocation *> headers;
@@ -930,11 +928,12 @@
const FileLocation& compilationName = compilationUnit.GetFilename ();
const FileLocation *object_file = GetObjectFilename ( &compilationName, module
);
fprintf ( fMakefile,
- "%s := %s $(%s)\n",
+ "%s := %s\n",
objectsMacro.c_str(),
- backend->GetFullName ( *object_file ).c_str (),
- objectsMacro.c_str() );
+ backend->GetFullName ( *object_file ).c_str () );
delete object_file;
+ assignmentOperation = "+=";
+ break;
}
}
fprintf (
@@ -1755,9 +1754,7 @@
{
sourcesMacro = ssprintf ( "%s_SOURCES", module.name.c_str ());
- GenerateSourceMacros (
- "=",
- module.non_if_data );
+ GenerateSourceMacros ( module.non_if_data );
// future references to the macro will be to get its values
sourcesMacro = ssprintf ("$(%s)", sourcesMacro.c_str ());
@@ -1768,9 +1765,7 @@
{
objectsMacro = ssprintf ("%s_OBJS", module.name.c_str ());
- GenerateObjectMacros (
- "=",
- module.non_if_data );
+ GenerateObjectMacros ( module.non_if_data );
// future references to the macro will be to get its values
objectsMacro = ssprintf ("$(%s)", objectsMacro.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 [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h [iso-8859-1] Sun Jul 27
12:12:44 2008
@@ -134,10 +134,8 @@
const IfableData& data,
const std::vector<LinkerFlag*>* linkerFlags,
std::set<const Define *>& used_defs );
- void GenerateSourceMacros ( const char* assignmentOperation,
- const IfableData& data );
- void GenerateObjectMacros ( const char* assignmentOperation,
- const IfableData& data );
+ void GenerateSourceMacros ( const IfableData& data );
+ void GenerateObjectMacros ( const IfableData& data );
std::string GenerateGccIncludeParameters () const;
std::string GenerateGccParameters () const;
std::string GenerateNasmParameters () const;