echo [WMC] commands
remove some unnecessary indirect dependencies
have rbuild mkdir commands depend directly on RMKDIR_TARGET
don't have object files depend on themselves!
add rmkdir, rsym, and wmc phony targets
Modified: branches/xmlbuildsystem/reactos/Makefile
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
Modified: branches/xmlbuildsystem/reactos/tools/tools.mak
Modified: branches/xmlbuildsystem/reactos/tools/wmc/wmc.mak

Modified: branches/xmlbuildsystem/reactos/Makefile
--- branches/xmlbuildsystem/reactos/Makefile	2005-03-14 18:51:29 UTC (rev 14066)
+++ branches/xmlbuildsystem/reactos/Makefile	2005-03-14 19:11:03 UTC (rev 14067)
@@ -53,6 +53,7 @@
   ECHO_LD     =@echo [LD]      $@
   ECHO_RBUILD =@echo [RBUILD]  $@
   ECHO_RSYM   =@echo [RSYM]    $@
+  ECHO_WMC    =@echo [WMC]     $@
   ECHO_NCI    =@echo [NCI]     $@
   ECHO_CABMAN =@echo [CABMAN]  $<
   ECHO_CDMAKE =@echo [CDMAKE]  $@
@@ -71,6 +72,7 @@
   ECHO_LD     =
   ECHO_RBUILD =
   ECHO_RSYM   =
+  ECHO_WMC    =
   ECHO_NCI    =
   ECHO_CABMAN =
   ECHO_CDMAKE =
@@ -156,16 +158,18 @@
 	$(ERRCODES_RC) \
 	$(NCI_SERVICE_FILES)
 
-makefile.auto: $(RMKDIR_TARGET) $(BIN2RES_TARGET) $(WINEBUILD_TARGET) $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES)
+makefile.auto: $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES)
 	$(ECHO_RBUILD)
 	$(Q)tools$(SEP)rbuild$(SEP)rbuild$(EXEPOSTFIX) mingw
 
 
 $(BUGCODES_H) $(BUGCODES_RC): $(WMC_TARGET) $(NTOSKRNL_MC)
-	$(WMC_TARGET) -i -H $(BUGCODES_H) -o $(BUGCODES_RC) $(NTOSKRNL_MC)
+	$(ECHO_WMC)
+	$(Q)$(WMC_TARGET) -i -H $(BUGCODES_H) -o $(BUGCODES_RC) $(NTOSKRNL_MC)
 
 $(ERRCODES_H) $(ERRCODES_RC): $(WMC_TARGET) $(KERNEL32_MC)
-	$(WMC_TARGET) -i -H $(ERRCODES_H) -o $(ERRCODES_RC) $(KERNEL32_MC)
+	$(ECHO_WMC)
+	$(Q)$(WMC_TARGET) -i -H $(ERRCODES_H) -o $(ERRCODES_RC) $(KERNEL32_MC)
 
 .PHONY: makefile_auto_clean
 makefile_auto_clean:

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp	2005-03-14 18:51:29 UTC (rev 14066)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp	2005-03-14 19:11:03 UTC (rev 14067)
@@ -336,7 +336,7 @@
 		if ( IncludeDirectoryTarget ( *i ) )
 		{
 			fprintf ( fMakefile,
-			          "%s:\n",
+			          "%s: $(RMKDIR_TARGET)\n",
 			          i->c_str () );
 			fprintf ( fMakefile, 
 			          "\t${mkdir} %s\n\n",

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-03-14 18:51:29 UTC (rev 14066)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-03-14 19:11:03 UTC (rev 14067)
@@ -725,9 +725,8 @@
 	string objectFilename = PassThruCacheDirectory (
 		GetObjectFilename ( module, sourceFilename ) );
 	fprintf ( fMakefile,
-	          "%s: %s %s\n",
+	          "%s: %s\n",
 	          objectFilename.c_str (),
-	          objectFilename.c_str (),
 	          deps.c_str () );
 	fprintf ( fMakefile, "\t$(ECHO_CC)\n" );
 	fprintf ( fMakefile,
@@ -835,7 +834,7 @@
 	CLEAN_FILE ( stub_file );
 
 	fprintf ( fMakefile,
-	          "%s: %s\n",
+	          "%s: %s $(WINEBUILD_TARGET)\n",
 	          def_file.c_str (),
 	          sourceFilename.c_str () );
 	fprintf ( fMakefile, "\t$(ECHO_WINEBLD)\n" );
@@ -1848,7 +1847,7 @@
 {
 	fprintf ( fMakefile, ".PHONY: %s_extractresources\n\n",
 	          module.name.c_str () );
-	fprintf ( fMakefile, "%s_extractresources: bin2res\n",
+	fprintf ( fMakefile, "%s_extractresources: $(BIN2RES_TARGET)\n",
 	          module.name.c_str () );
 	const vector<File*>& files = module.non_if_data.files;
 	for ( size_t i = 0; i < files.size (); i++ )

Modified: branches/xmlbuildsystem/reactos/tools/tools.mak
--- branches/xmlbuildsystem/reactos/tools/tools.mak	2005-03-14 18:51:29 UTC (rev 14066)
+++ branches/xmlbuildsystem/reactos/tools/tools.mak	2005-03-14 19:11:03 UTC (rev 14067)
@@ -13,6 +13,9 @@
 
 RMKDIR_HOST_LFLAGS = -g
 
+.PHONY: rmkdir
+rmkdir: $(RMKDIR_TARGET)
+
 $(RMKDIR_TARGET): $(INTERMEDIATE_NO_SLASH) $(RMKDIR_OBJECTS)
 	$(ECHO_LD)
 	${host_gcc} $(RMKDIR_OBJECTS) $(RMKDIR_HOST_LFLAGS) -o $(RMKDIR_TARGET)
@@ -42,6 +45,9 @@
 
 RSYM_HOST_LFLAGS = -g
 
+.PHONY: rsym
+rsym: $(RSYM_TARGET)
+
 $(RSYM_TARGET): $(RSYM_OBJECTS)
 	$(ECHO_LD)
 	${host_gcc} $(RSYM_OBJECTS) $(RSYM_HOST_LFLAGS) -o $(RSYM_TARGET)

Modified: branches/xmlbuildsystem/reactos/tools/wmc/wmc.mak
--- branches/xmlbuildsystem/reactos/tools/wmc/wmc.mak	2005-03-14 18:51:29 UTC (rev 14066)
+++ branches/xmlbuildsystem/reactos/tools/wmc/wmc.mak	2005-03-14 19:11:03 UTC (rev 14067)
@@ -25,6 +25,9 @@
 
 WMC_HOST_LFLAGS = -g
 
+.PHONY: wmc
+wmc: $(WMC_TARGET)
+
 $(WMC_TARGET): $(WMC_BASE_DIR) $(WMC_OBJECTS)
 	$(ECHO_LD)
 	${host_gcc} $(WMC_OBJECTS) $(WMC_HOST_LFLAGS) -o $(WMC_TARGET)