Author: janderwald
Date: Thu Jun 28 14:03:54 2007
New Revision: 27303
URL:
http://svn.reactos.org/svn/reactos?rev=27303&view=rev
Log:
- add option to macro to specify for which backend this macro is intended
If the macro is for all backends, then you dont need to set this option
However, if this macro is for gcc only then put an option, i.e.:
<define name="__USE_W32API" backend="mingw" />
for msvc backend set backend="msvc"
-Currently filtering is only implemented for msvc backend
Modified:
trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
trunk/reactos/tools/rbuild/define.cpp
trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp (original)
+++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp Thu Jun 28 14:03:54 2007
@@ -195,6 +195,9 @@
const vector<Define*>& defs = data.defines;
for ( i = 0; i < defs.size(); i++ )
{
+ if ( defs[i]->backend != "" && defs[i]->backend !=
"msvc" )
+ continue;
+
if ( defs[i]->value[0] )
common_defines.insert( defs[i]->name + "=" + defs[i]->value );
else
Modified: trunk/reactos/tools/rbuild/define.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/define.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/define.cpp (original)
+++ trunk/reactos/tools/rbuild/define.cpp Thu Jun 28 14:03:54 2007
@@ -44,13 +44,15 @@
Define::Define ( const Project& project,
const Module* module,
- const std::string name_ )
+ const std::string name_,
+ const std::string backend_)
: project(project),
module(module),
node(NULL)
{
name = name_;
value = "";
+ backend = backend_;
}
Define::~Define ()
@@ -62,9 +64,11 @@
{
const XMLAttribute* att = node->GetAttribute ( "name", true );
const XMLAttribute* empty = node->GetAttribute ( "empty", false );
+ const XMLAttribute* bck = node->GetAttribute ( "backend", false );
assert(att);
name = att->value;
- value = node->value;
+ value = node->value;
+ if ( bck ) backend = bck->value;
if( empty ) value = " ";
}
Modified: trunk/reactos/tools/rbuild/rbuild.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=…
==============================================================================
--- trunk/reactos/tools/rbuild/rbuild.h (original)
+++ trunk/reactos/tools/rbuild/rbuild.h Thu Jun 28 14:03:54 2007
@@ -390,6 +390,7 @@
const XMLElement* node;
std::string name;
std::string value;
+ std::string backend;
Define ( const Project& project,
const XMLElement& defineNode );
@@ -398,7 +399,8 @@
const XMLElement& defineNode );
Define ( const Project& project,
const Module* module,
- const std::string name_ );
+ const std::string name_,
+ const std::string backend_ = "" );
~Define();
void ProcessXML();
private: