forgot to recurse If elements when generating macros
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.h

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-01-12 13:43:05 UTC (rev 12965)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-01-12 14:07:55 UTC (rev 12966)
@@ -267,6 +267,7 @@
 	const vector<File*>& files,
 	const vector<Include*>* includes,
 	const vector<Define*>& defines,
+	const vector<If*>* ifs,
 	const string& cflags_macro,
 	const string& nasmflags_macro,
 	const string& objs_macro) const
@@ -319,6 +320,35 @@
 		}
 		fprintf ( fMakefile, "\n" );
 	}
+
+	if ( ifs && ifs->size() )
+	{
+		for ( size_t i = 0; i < module.ifs.size(); i++ )
+		{
+			If& rIf = *(*ifs)[i];
+			if ( rIf.defines.size() || rIf.files.size() || rIf.ifs.size() )
+			{
+				fprintf (
+					fMakefile,
+					"ifeq ($(%s),\"%s\")\n",
+					rIf.property.c_str(),
+					rIf.value.c_str() );
+				GenerateMacros (
+					module,
+					"+=",
+					rIf.files,
+					NULL,
+					rIf.defines,
+					&rIf.ifs,
+					cflags_macro,
+					nasmflags_macro,
+					objs_macro );
+				fprintf ( 
+					fMakefile,
+					"endif\n\n" );
+			}
+		}
+	}
 }
 
 void
@@ -334,6 +364,7 @@
 		module.files,
 		&module.includes,
 		module.defines,
+		NULL,
 		cflags_macro,
 		nasmflags_macro,
 		objs_macro );
@@ -342,7 +373,7 @@
 	for ( size_t i = 0; i < module.ifs.size(); i++ )
 	{
 		If& rIf = *module.ifs[i];
-		if ( rIf.defines.size() || rIf.files.size() )
+		if ( rIf.defines.size() || rIf.files.size() || rIf.ifs.size() )
 		{
 			fprintf (
 				fMakefile,
@@ -355,6 +386,7 @@
 				rIf.files,
 				NULL,
 				rIf.defines,
+				&rIf.ifs,
 				cflags_macro,
 				nasmflags_macro,
 				objs_macro );

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.h	2005-01-12 13:43:05 UTC (rev 12965)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.h	2005-01-12 14:07:55 UTC (rev 12966)
@@ -51,6 +51,7 @@
 	                      const std::vector<File*>& files,
 	                      const std::vector<Include*>* includes,
 	                      const std::vector<Define*>& defines,
+	                      const std::vector<If*>* ifs,
 	                      const std::string& cflags_macro,
 	                      const std::string& nasmflags_macro,
 	                      const std::string& objs_macro) const;