create a couple more variables to reduce makefile size
preparations for <if> support
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-11 01:47:35 UTC (rev 12924)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-01-11 18:20:30 UTC (rev 12925)
@@ -237,10 +237,11 @@
 void
 MingwModuleHandler::GenerateGccModuleIncludeVariable ( const Module& module ) const
 {
-	string name ( module.name + "_INCLUDES" );
+	string name ( module.name + "_CFLAGS" );
 	fprintf ( fMakefile,
-	          "%s := %s\n",
+	          "%s := %s %s\n",
 	          name.c_str(),
+			  GenerateGccDefineParameters(module).c_str(),
 	          GenerateGccIncludeParameters(module).c_str() );
 }
 
@@ -260,9 +261,7 @@
 string
 MingwModuleHandler::GenerateGccParameters ( const Module& module ) const
 {
-	string parameters = GenerateGccDefineParameters ( module );
-	parameters += ssprintf(" $(%s_INCLUDES)", module.name.c_str());
-	return parameters;
+	return ssprintf(" $(%s_CFLAGS)", module.name.c_str());
 }
 
 string
@@ -381,18 +380,18 @@
 {
 	string archiveFilename = GetModuleArchiveFilename ( module );
 	string sourceFilenames = GetSourceFilenames ( module );
-	string objectFilenames = GetObjectFilenames ( module );
+	string objectsMacro = GenerateObjectList ( module );
 	
 	fprintf ( fMakefile,
 	          "%s: %s\n",
 	          archiveFilename.c_str (),
-	          objectFilenames.c_str ());
+	          objectsMacro.c_str ());
 
 	fprintf ( fMakefile,
 	          "\t%s -rc %s %s\n\n",
 	          ar.c_str (),
 	          archiveFilename.c_str (),
-	          objectFilenames.c_str ());
+	          objectsMacro.c_str ());
 }
 
 void
@@ -527,7 +526,18 @@
 	          preconditionDependenciesName.c_str () );
 }
 
+string MingwModuleHandler::GenerateObjectList ( const Module& module ) const
+{
+	string macro ( ssprintf("%s_OBJS",module.name.c_str()) );
+	fprintf (
+		fMakefile,
+		"%s = %s\n",
+		macro.c_str(),
+		GetObjectFilenames(module).c_str() );
+	return ssprintf("$(%s)",macro.c_str());
+}
 
+
 static MingwBuildToolModuleHandler buildtool_handler;
 
 MingwBuildToolModuleHandler::MingwBuildToolModuleHandler()

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.h	2005-01-11 01:47:35 UTC (rev 12924)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.h	2005-01-11 18:20:30 UTC (rev 12925)
@@ -38,6 +38,7 @@
 	std::string GetInvocationParameters ( const Invoke& invoke ) const;
 	void GenerateInvocations ( const Module& module ) const;
 	void GeneratePreconditionDependencies ( const Module& module ) const;
+	std::string GenerateObjectList ( const Module& module ) const;
 	static FILE* fMakefile;
 private:
 	std::string ConcatenatePaths ( const std::string& path1,