Revert my changes in r37808.
authorColin Finck <colin@reactos.org>
Tue, 2 Dec 2008 19:05:11 +0000 (19:05 +0000)
committerColin Finck <colin@reactos.org>
Tue, 2 Dec 2008 19:05:11 +0000 (19:05 +0000)
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

reactos/ReactOS-arm.rbuild
reactos/ReactOS-generic.rbuild
reactos/config.template.rbuild
reactos/ntoskrnl/ntoskrnl-generic.rbuild
reactos/tools/rbuild/module.cpp
reactos/tools/rbuild/project.cpp

index 1e65387..2020732 100644 (file)
        <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>
index a850eaf..ec0ef2f 100644 (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 -->
index b781959..b751cf9 100644 (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" />
 
index 6c7626b..2f29554 100644 (file)
                                <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>
index ef747b2..c38af44 100644 (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
index 8660120..8366ce9 100644 (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