Author: hpoussin
Date: Fri Oct 19 18:16:18 2007
New Revision: 29682
URL:
http://svn.reactos.org/svn/reactos?rev=29682&view=rev
Log:
Ignore compiler flags when generating resource macro
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 Fri Oct 19 18:16:18 2007
@@ -766,12 +766,16 @@
const char* assignmentOperation,
const string& macro,
const IfableData& data,
- set<string> *used_defs )
+ set<string> *used_defs,
+ bool generatingCompilerMacro )
{
size_t i;
bool generateAssignment;
- generateAssignment = (use_pch && module.pch != NULL ) || data.includes.size ()
> 0 || data.defines.size () > 0 || data.compilerFlags.size () > 0;
+ if ( generatingCompilerMacro )
+ generateAssignment = (use_pch && module.pch != NULL ) || data.includes.size ()
> 0 || data.defines.size () > 0 || data.compilerFlags.size () > 0;
+ else
+ generateAssignment = (use_pch && module.pch != NULL ) || data.includes.size ()
> 0 || data.defines.size () > 0;
if ( generateAssignment )
{
fprintf ( fMakefile,
@@ -787,15 +791,17 @@
backend->GetFullPath ( *GetPrecompiledHeaderFilename () ).c_str () );
}
- string compilerParameters = GenerateCompilerParametersFromVector ( data.compilerFlags
);
- if ( compilerParameters.size () > 0 )
- {
- fprintf (
- fMakefile,
- " %s",
- compilerParameters.c_str () );
- }
-
+ if ( generatingCompilerMacro )
+ {
+ string compilerParameters = GenerateCompilerParametersFromVector ( data.compilerFlags
);
+ if ( compilerParameters.size () > 0 )
+ {
+ fprintf (
+ fMakefile,
+ " %s",
+ compilerParameters.c_str () );
+ }
+ }
for ( i = 0; i < data.includes.size(); i++ )
{
const Include& include = *data.includes[i];
@@ -845,11 +851,13 @@
GenerateMacro ( assignmentOperation,
cflagsMacro,
data,
- &used_defs );
+ &used_defs,
+ true );
GenerateMacro ( assignmentOperation,
windresflagsMacro,
data,
- NULL );
+ NULL,
+ false );
if ( linkerFlags != NULL )
{
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 Fri Oct 19 18:16:18 2007
@@ -137,7 +137,8 @@
void GenerateMacro ( const char* assignmentOperation,
const std::string& macro,
const IfableData& data,
- std::set<std::string>* used_defs );
+ std::set<std::string>* used_defs,
+ bool generatingCompilerMacro );
void GenerateMacros ( const char* op,
const IfableData& data,
const std::vector<LinkerFlag*>* linkerFlags,