Author: hpoussin
Date: Mon Sep 24 13:15:49 2007
New Revision: 29175
URL:
http://svn.reactos.org/svn/reactos?rev=29175&view=rev
Log:
Display a message when a module has been disabled
Support variables in aliased module names
Modified:
trunk/reactos/tools/rbuild/module.cpp
Modified: trunk/reactos/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/module.cpp (original)
+++ trunk/reactos/tools/rbuild/module.cpp Mon Sep 24 13:15:49 2007
@@ -251,9 +251,13 @@
xmlbuildFile = Path::RelativeFromWorkingDirectory ( moduleNode.xmlFile->filename ()
);
+ const XMLAttribute* att = moduleNode.GetAttribute ( "name", true );
+ assert(att);
+ name = att->value;
+
enabled = true;
- const XMLAttribute* att = moduleNode.GetAttribute ( "if", false );
+ att = moduleNode.GetAttribute ( "if", false );
if ( att != NULL )
enabled = GetBooleanValue ( project.ResolveProperties ( att->value ) );
@@ -261,9 +265,8 @@
if ( att != NULL )
enabled = !GetBooleanValue ( project.ResolveProperties ( att->value ) );
- att = moduleNode.GetAttribute ( "name", true );
- assert(att);
- name = att->value;
+ if ( !enabled && project.configuration.Verbose )
+ printf("Module '%s' has been disabled.\n", name.c_str () );
att = moduleNode.GetAttribute ( "type", true );
assert(att);
@@ -483,6 +486,7 @@
{
if ( type == Alias )
{
+ aliasedModuleName = project.ResolveProperties ( aliasedModuleName );
if ( aliasedModuleName == name )
{
throw XMLInvalidBuildFileException (
@@ -491,7 +495,7 @@
name.c_str() );
}
const Module* m = project.LocateModule ( aliasedModuleName );
- if ( !m )
+ if ( !m && enabled )
{
throw XMLInvalidBuildFileException (
node.location,
@@ -1602,7 +1606,7 @@
att = node_.GetAttribute ( "name", true );
assert(att);
- name = att->value;
+ name = project.ResolveProperties ( att->value );
att = node_.GetAttribute ( "value", true );
assert(att);