Correct some wrong dependencies for 'make bootcd'
Modified: branches/xmlbuildsystem/reactos/Makefile
Modified: branches/xmlbuildsystem/reactos/tools/cabman/cabman.mak
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp

Modified: branches/xmlbuildsystem/reactos/Makefile
--- branches/xmlbuildsystem/reactos/Makefile	2005-04-06 20:05:23 UTC (rev 14531)
+++ branches/xmlbuildsystem/reactos/Makefile	2005-04-06 20:49:49 UTC (rev 14532)
@@ -178,6 +178,13 @@
 endif
 OUTPUT_ := $(OUTPUT)$(SEP)
 
+ifneq ($(ROS_TEMPORARY),)
+  TEMPORARY := $(ROS_TEMPORARY)
+else
+  TEMPORARY := .
+endif
+TEMPORARY_ := $(TEMPORARY)$(SEP)
+
 ifneq ($(ROS_INSTALL),)
   INSTALL := $(ROS_INSTALL)
 else

Modified: branches/xmlbuildsystem/reactos/tools/cabman/cabman.mak
--- branches/xmlbuildsystem/reactos/tools/cabman/cabman.mak	2005-04-06 20:05:23 UTC (rev 14531)
+++ branches/xmlbuildsystem/reactos/tools/cabman/cabman.mak	2005-04-06 20:49:49 UTC (rev 14532)
@@ -18,7 +18,7 @@
 CABMAN_TARGET = \
 	$(EXEPREFIX)$(CABMAN_OUT_)cabman$(EXEPOSTFIX)
 
-CABMAN_SOURCES = $(addprefix $(CABMAN_INT_), \
+CABMAN_SOURCES = $(addprefix $(CABMAN_BASE_), \
 	cabinet.cxx \
 	dfp.cxx \
 	main.cxx \
@@ -42,23 +42,23 @@
 	$(ECHO_LD)
 	${host_gpp} $(CABMAN_OBJECTS) $(CABMAN_HOST_LFLAGS) -o $@
 
-$(CABMAN_INT_)cabinet.o: $(CABMAN_BASE_)cabinet.cxx $(CABMAN_BASE_DIR)
+$(CABMAN_INT_)cabinet.o: $(CABMAN_BASE_)cabinet.cxx $(CABMAN_INT)
 	$(ECHO_CC)
 	${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
 
-$(CABMAN_INT_)dfp.o: $(CABMAN_BASE_)dfp.cxx $(CABMAN_BASE_DIR)
+$(CABMAN_INT_)dfp.o: $(CABMAN_BASE_)dfp.cxx $(CABMAN_INT)
 	$(ECHO_CC)
 	${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
 
-$(CABMAN_INT_)main.o: $(CABMAN_BASE_)main.cxx $(CABMAN_BASE_DIR)
+$(CABMAN_INT_)main.o: $(CABMAN_BASE_)main.cxx $(CABMAN_INT)
 	$(ECHO_CC)
 	${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
 
-$(CABMAN_INT_)mszip.o: $(CABMAN_BASE_)mszip.cxx $(CABMAN_BASE_DIR)
+$(CABMAN_INT_)mszip.o: $(CABMAN_BASE_)mszip.cxx $(CABMAN_INT)
 	$(ECHO_CC)
 	${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
 
-$(CABMAN_INT_)raw.o: $(CABMAN_BASE_)raw.cxx $(CABMAN_BASE_DIR)
+$(CABMAN_INT_)raw.o: $(CABMAN_BASE_)raw.cxx $(CABMAN_INT)
 	$(ECHO_CC)
 	${host_gpp} $(CABMAN_HOST_CFLAGS) -c $< -o $@
 

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-04-06 20:05:23 UTC (rev 14531)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-04-06 20:49:49 UTC (rev 14532)
@@ -10,7 +10,7 @@
 
 #define CLEAN_FILE(f) clean_files.push_back ( f ); /*if ( module.name == "crt" ) printf ( "%s(%i): clean: %s\n", __FILE__, __LINE__, f.c_str() )*/
 
-static string ros_temp = "$(ROS_TEMPORARY)";
+static string ros_temp = "$(TEMPORARY)";
 MingwBackend*
 MingwModuleHandler::backend = NULL;
 FILE*
@@ -339,6 +339,8 @@
 	const string& sourceFilename,
 	string_list* pclean_files ) const
 {
+	Directory* directoryTree;
+
 	string newExtension;
 	string extension = GetExtension ( sourceFilename );
 	if ( extension == ".rc" || extension == ".RC" )
@@ -347,11 +349,17 @@
 		newExtension = ".stubs.o";
 	else
 		newExtension = ".o";
+	
+	if ( module.type == BootSector )
+		directoryTree = backend->outputDirectory;
+	else
+		directoryTree = backend->intermediateDirectory;
+
 	string obj_file = PassThruCacheDirectory (
 		NormalizeFilename ( ReplaceExtension (
 			RemoveVariables ( sourceFilename ),
 			                  newExtension ) ),
-			backend->intermediateDirectory );
+			directoryTree );
 	if ( pclean_files )
 	{
 		string_list& clean_files = *pclean_files;
@@ -2188,7 +2196,9 @@
 		if ( m.bootstrap != NULL )
 		{
 			string targetFilenameNoFixup ( bootcdDirectory + SSEP + m.bootstrap->base + SSEP + m.bootstrap->nameoncd );
-			string targetFilename ( GetTargetMacro ( module ) );
+			string targetFilename = MingwModuleHandler::PassThruCacheDirectory (
+				NormalizeFilename ( targetFilenameNoFixup ),
+				backend->outputDirectory );
 			fprintf ( fMakefile,
 			          "\t$(ECHO_CP)\n" );
 			fprintf ( fMakefile,
@@ -2272,7 +2282,12 @@
 	{
 		const Module& m = *module.project.modules[i];
 		if ( m.bootstrap != NULL )
-			out.push_back ( NormalizeFilename ( m.GetPath () ) );
+		{
+			string filename = PassThruCacheDirectory (
+				NormalizeFilename ( m.GetPath () ),
+				backend->outputDirectory );
+			out.push_back ( filename );
+		}
 	}
 }
 
@@ -2283,7 +2298,7 @@
 	for ( size_t i = 0; i < module.project.cdfiles.size (); i++ )
 	{
 		const CDFile& cdfile = *module.project.cdfiles[i];
-		out.push_back ( NormalizeFilename ( cdfile.GetPath () ) );
+		out.push_back ( cdfile.GetPath () );
 	}
 }
 
@@ -2299,7 +2314,9 @@
 MingwIsoModuleHandler::GenerateIsoModuleTarget ()
 {
 	string bootcdDirectory = "cd";
-	string isoboot = NormalizeFilename ( "boot/freeldr/bootsect/isoboot.o" );
+	string isoboot = PassThruCacheDirectory (
+		NormalizeFilename ( "boot/freeldr/bootsect/isoboot.o" ),
+		backend->intermediateDirectory );
 	string bootcdReactosNoFixup = bootcdDirectory + "/reactos";
 	string bootcdReactos = PassThruCacheDirectory (
 		NormalizeFilename ( bootcdReactosNoFixup ),

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp	2005-04-06 20:05:23 UTC (rev 14531)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp	2005-04-06 20:49:49 UTC (rev 14532)
@@ -589,7 +589,10 @@
 string
 Module::GetPath () const
 {
-	return path + CSEP + GetTargetName ();
+	if ( path.length() > 0 )
+		return path + CSEP + GetTargetName ();
+	else
+		return GetTargetName ();
 }
 
 string