list directory dependencies last, so that $(ECHO_FOO) prints the right thing. also use $@ where possible to reduce makefile.auto size a bit
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-03-14 19:31:25 UTC (rev 14068)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-03-14 19:38:13 UTC (rev 14069)
@@ -727,14 +727,13 @@
 	fprintf ( fMakefile,
 	          "%s: %s %s\n",
 	          objectFilename.c_str (),
-	          GetDirectory ( objectFilename ).c_str (),
-	          deps.c_str () );
+	          deps.c_str (),
+	          GetDirectory ( objectFilename ).c_str () );
 	fprintf ( fMakefile, "\t$(ECHO_CC)\n" );
 	fprintf ( fMakefile,
-	         "\t%s -c %s -o %s %s\n",
+	         "\t%s -c %s -o $@ %s\n",
 	         cc.c_str (),
 	         sourceFilename.c_str (),
-	         objectFilename.c_str (),
 	         cflagsMacro.c_str () );
 }
 
@@ -749,14 +748,13 @@
 	fprintf ( fMakefile,
 	          "%s: %s %s\n",
 	          objectFilename.c_str (),
-	          GetDirectory ( objectFilename ).c_str (),
-	          sourceFilename.c_str () );
+	          sourceFilename.c_str (),
+	          GetDirectory ( objectFilename ).c_str () );
 	fprintf ( fMakefile, "\t$(ECHO_GAS)\n" );
 	fprintf ( fMakefile,
-	          "\t%s -x assembler-with-cpp -c %s -o %s -D__ASM__ %s\n",
+	          "\t%s -x assembler-with-cpp -c %s -o $@ -D__ASM__ %s\n",
 	          cc.c_str (),
 	          sourceFilename.c_str (),
-	          objectFilename.c_str (),
 	          cflagsMacro.c_str () );
 }
 
@@ -770,14 +768,13 @@
 	fprintf ( fMakefile,
 	          "%s: %s %s\n",
 	          objectFilename.c_str (),
-	          GetDirectory ( objectFilename ).c_str (),
-	          sourceFilename.c_str () );
+	          sourceFilename.c_str (),
+	          GetDirectory ( objectFilename ).c_str () );
 	fprintf ( fMakefile, "\t$(ECHO_NASM)\n" );
 	fprintf ( fMakefile,
-	          "\t%s -f win32 %s -o %s %s\n",
+	          "\t%s -f win32 %s -o $@ %s\n",
 	          "$(Q)nasm",
 	          sourceFilename.c_str (),
-	          objectFilename.c_str (),
 	          nasmflagsMacro.c_str () );
 }
 
@@ -795,8 +792,8 @@
 	fprintf ( fMakefile,
 	          "%s: %s %s $(WRC_TARGET)\n",
 	          objectFilename.c_str (),
-	          GetDirectory ( objectFilename ).c_str (),
-	          sourceFilename.c_str () );
+	          sourceFilename.c_str (),
+	          GetDirectory ( objectFilename ).c_str () );
 	fprintf ( fMakefile, "\t$(ECHO_WRC)\n" );
 	fprintf ( fMakefile,
 	         "\t${gcc} -xc -E -DRC_INVOKED ${%s} %s > %s\n",