Revert my changes in r37808.

Reenable testing on undefined properties, they are treated as being empty now. This feature got lost when moving the <if> block parsing entirely to rbuild in r34852.

Should fix the Release build properly _with_ touching rbuild :-)

svn path=/trunk/; revision=37811
This commit is contained in:
Colin Finck 2008-12-02 19:05:11 +00:00
parent 533570807b
commit c00c841bd4
6 changed files with 34 additions and 24 deletions

View file

@ -17,10 +17,11 @@
<if property="DBG" value="1">
<define name="DBG">1</define>
<define name="_SEH_ENABLE_TRACE" />
<if property="KDBG" value="1">
<define name="KDBG">1</define>
</if>
<property name="DBG_OR_KDBG" value="true" />
</if>
<if property="KDBG" value="1">
<define name="KDBG">1</define>
<property name="DBG_OR_KDBG" value="true" />
</if>
<include>.</include>

View file

@ -9,10 +9,11 @@
<if property="DBG" value="1">
<define name="DBG">1</define>
<define name="_SEH_ENABLE_TRACE" />
<if property="KDBG" value="1">
<define name="KDBG">1</define>
</if>
<property name="DBG_OR_KDBG" value="true" />
</if>
<if property="KDBG" value="1">
<define name="KDBG">1</define>
<property name="DBG_OR_KDBG" value="true" />
</if>
<!-- The version target valid values are: Nt4 , NT5 , NT51 -->

View file

@ -43,7 +43,7 @@
<!--
Whether to compile in the integrated kernel debugger. Requires DBG to be set.
Whether to compile in the integrated kernel debugger.
-->
<property name="KDBG" value="1" />

View file

@ -302,7 +302,7 @@
<file>kdb_keyboard.c</file>
<file>kdb_serial.c</file>
</if>
<if property="DBG" value="1">
<if property="DBG_OR_KDBG" value="true">
<file>kdb_symbols.c</file>
</if>
</directory>

View file

@ -745,13 +745,17 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
name = e.GetAttribute ( "property", true );
assert( name );
const Property *property = project.LookupProperty( name->value );
if ( !property )
const string *PropertyValue;
const string EmptyString;
if (property)
{
// Property not found
throw InvalidOperationException ( __FILE__,
__LINE__,
"Test on unknown property '%s' at %s",
name->value.c_str (), e.location.c_str () );
PropertyValue = &property->value;
}
else
{
// Property does not exist, treat it as being empty
PropertyValue = &EmptyString;
}
const XMLAttribute* value;
@ -759,7 +763,7 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
assert( value );
bool negate = ( e.name == "ifnot" );
bool equality = ( property->value == value->value );
bool equality = ( *PropertyValue == value->value );
if ( equality == negate )
{
// Failed, skip this element

View file

@ -399,13 +399,17 @@ Project::ProcessXMLSubElement ( const XMLElement& e,
name = e.GetAttribute ( "property", true );
assert( name );
const Property *property = LookupProperty( name->value );
if ( !property )
const string *PropertyValue;
const string EmptyString;
if (property)
{
// Property not found
throw InvalidOperationException ( __FILE__,
__LINE__,
"Test on unknown property '%s' at %s",
name->value.c_str (), e.location.c_str () );
PropertyValue = &property->value;
}
else
{
// Property does not exist, treat it as being empty
PropertyValue = &EmptyString;
}
const XMLAttribute* value;
@ -413,7 +417,7 @@ Project::ProcessXMLSubElement ( const XMLElement& e,
assert( value );
bool negate = ( e.name == "ifnot" );
bool equality = ( property->value == value->value );
bool equality = ( *PropertyValue == value->value );
if ( equality == negate )
{
// Failed, skip this element