[ros-diffs] [cfinck] 37811: 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 :-)

cfinck at svn.reactos.org cfinck at svn.reactos.org
Tue Dec 2 20:05:12 CET 2008


Author: cfinck
Date: Tue Dec  2 13:05:11 2008
New Revision: 37811

URL: http://svn.reactos.org/svn/reactos?rev=37811&view=rev
Log:
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 :-)

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

Modified: trunk/reactos/ReactOS-arm.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-arm.rbuild?rev=37811&r1=37810&r2=37811&view=diff
==============================================================================
--- trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] Tue Dec  2 13:05:11 2008
@@ -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>

Modified: trunk/reactos/ReactOS-generic.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-generic.rbuild?rev=37811&r1=37810&r2=37811&view=diff
==============================================================================
--- trunk/reactos/ReactOS-generic.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ReactOS-generic.rbuild [iso-8859-1] Tue Dec  2 13:05:11 2008
@@ -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 -->

Modified: trunk/reactos/config.template.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/config.template.rbuild?rev=37811&r1=37810&r2=37811&view=diff
==============================================================================
--- trunk/reactos/config.template.rbuild [iso-8859-1] (original)
+++ trunk/reactos/config.template.rbuild [iso-8859-1] Tue Dec  2 13:05:11 2008
@@ -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" />
 

Modified: trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild?rev=37811&r1=37810&r2=37811&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Tue Dec  2 13:05:11 2008
@@ -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>

Modified: trunk/reactos/tools/rbuild/module.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?rev=37811&r1=37810&r2=37811&view=diff
==============================================================================
--- trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] Tue Dec  2 13:05:11 2008
@@ -745,13 +745,17 @@
 		name = e.GetAttribute ( "property", true );
 		assert( name );
 		const Property *property = project.LookupProperty( name->value );
-		if ( !property )
-		{
-			// Property not found
-			throw InvalidOperationException ( __FILE__,
-			                                  __LINE__,
-			                                  "Test on unknown property '%s' at %s",
-			                                  name->value.c_str (), e.location.c_str () );
+		const string *PropertyValue;
+		const string EmptyString;
+
+		if (property)
+		{
+			PropertyValue = &property->value;
+		}
+		else
+		{
+			// Property does not exist, treat it as being empty
+			PropertyValue = &EmptyString;
 		}
 
 		const XMLAttribute* value;
@@ -759,7 +763,7 @@
 		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

Modified: trunk/reactos/tools/rbuild/project.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/project.cpp?rev=37811&r1=37810&r2=37811&view=diff
==============================================================================
--- trunk/reactos/tools/rbuild/project.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/project.cpp [iso-8859-1] Tue Dec  2 13:05:11 2008
@@ -399,13 +399,17 @@
 		name = e.GetAttribute ( "property", true );
 		assert( name );
 		const Property *property = LookupProperty( name->value );
-		if ( !property )
-		{
-			// Property not found
-			throw InvalidOperationException ( __FILE__,
-			                                  __LINE__,
-			                                  "Test on unknown property '%s' at %s",
-			                                  name->value.c_str (), e.location.c_str () );
+		const string *PropertyValue;
+		const string EmptyString;
+
+		if (property)
+		{
+			PropertyValue = &property->value;
+		}
+		else
+		{
+			// Property does not exist, treat it as being empty
+			PropertyValue = &EmptyString;
 		}
 
 		const XMLAttribute* value;
@@ -413,7 +417,7 @@
 		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



More information about the Ros-diffs mailing list