list directory dependencies last, so that $(ECHO_FOO) prints the right thing. also...
authorRoyce Mitchell III <royce3@ev1.net>
Mon, 14 Mar 2005 19:38:13 +0000 (19:38 +0000)
committerRoyce Mitchell III <royce3@ev1.net>
Mon, 14 Mar 2005 19:38:13 +0000 (19:38 +0000)
svn path=/branches/xmlbuildsystem/; revision=14069

reactos/tools/rbuild/backend/mingw/modulehandler.cpp

index 498c045..1989fb3 100644 (file)
@@ -727,14 +727,13 @@ MingwModuleHandler::GenerateGccCommand ( const Module& module,
        fprintf ( fMakefile,\r
                  "%s: %s %s\n",\r
                  objectFilename.c_str (),\r
-                 GetDirectory ( objectFilename ).c_str (),\r
-                 deps.c_str () );\r
+                 deps.c_str (),\r
+                 GetDirectory ( objectFilename ).c_str () );\r
        fprintf ( fMakefile, "\t$(ECHO_CC)\n" );\r
        fprintf ( fMakefile,\r
-                "\t%s -c %s -o %s %s\n",\r
+                "\t%s -c %s -o $@ %s\n",\r
                 cc.c_str (),\r
                 sourceFilename.c_str (),\r
-                objectFilename.c_str (),\r
                 cflagsMacro.c_str () );\r
 }\r
 \r
@@ -749,14 +748,13 @@ MingwModuleHandler::GenerateGccAssemblerCommand ( const Module& module,
        fprintf ( fMakefile,\r
                  "%s: %s %s\n",\r
                  objectFilename.c_str (),\r
-                 GetDirectory ( objectFilename ).c_str (),\r
-                 sourceFilename.c_str () );\r
+                 sourceFilename.c_str (),\r
+                 GetDirectory ( objectFilename ).c_str () );\r
        fprintf ( fMakefile, "\t$(ECHO_GAS)\n" );\r
        fprintf ( fMakefile,\r
-                 "\t%s -x assembler-with-cpp -c %s -o %s -D__ASM__ %s\n",\r
+                 "\t%s -x assembler-with-cpp -c %s -o $@ -D__ASM__ %s\n",\r
                  cc.c_str (),\r
                  sourceFilename.c_str (),\r
-                 objectFilename.c_str (),\r
                  cflagsMacro.c_str () );\r
 }\r
 \r
@@ -770,14 +768,13 @@ MingwModuleHandler::GenerateNasmCommand ( const Module& module,
        fprintf ( fMakefile,\r
                  "%s: %s %s\n",\r
                  objectFilename.c_str (),\r
-                 GetDirectory ( objectFilename ).c_str (),\r
-                 sourceFilename.c_str () );\r
+                 sourceFilename.c_str (),\r
+                 GetDirectory ( objectFilename ).c_str () );\r
        fprintf ( fMakefile, "\t$(ECHO_NASM)\n" );\r
        fprintf ( fMakefile,\r
-                 "\t%s -f win32 %s -o %s %s\n",\r
+                 "\t%s -f win32 %s -o $@ %s\n",\r
                  "$(Q)nasm",\r
                  sourceFilename.c_str (),\r
-                 objectFilename.c_str (),\r
                  nasmflagsMacro.c_str () );\r
 }\r
 \r
@@ -795,8 +792,8 @@ MingwModuleHandler::GenerateWindresCommand ( const Module& module,
        fprintf ( fMakefile,\r
                  "%s: %s %s $(WRC_TARGET)\n",\r
                  objectFilename.c_str (),\r
-                 GetDirectory ( objectFilename ).c_str (),\r
-                 sourceFilename.c_str () );\r
+                 sourceFilename.c_str (),\r
+                 GetDirectory ( objectFilename ).c_str () );\r
        fprintf ( fMakefile, "\t$(ECHO_WRC)\n" );\r
        fprintf ( fMakefile,\r
                 "\t${gcc} -xc -E -DRC_INVOKED ${%s} %s > %s\n",\r