Author: hpoussin Date: Tue Nov 6 15:36:16 2007 New Revision: 30218
URL: http://svn.reactos.org/svn/reactos?rev=30218&view=rev Log: Don't hardcode bootsector output name in livecd target Revert r30199
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp trunk/reactos/tools/rbuild/module.cpp
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw/... ============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Tue Nov 6 15:36:16 2007 @@ -497,7 +497,10 @@ DirectoryLocation destination_directory; string newExtension; string extension = GetExtension ( *sourceFile ); - if ( extension == ".rc" || extension == ".RC" ) + + if ( module.type == BootSector ) + return new FileLocation ( *module.output ); + else if ( extension == ".rc" || extension == ".RC" ) newExtension = "_" + module.name + ".coff"; else if ( extension == ".spec" || extension == ".SPEC" ) newExtension = ".stubs.o"; @@ -3655,21 +3658,17 @@ string livecdDirectory = module.name; FileLocation livecd ( OutputDirectory, livecdDirectory, "" );
- string bootloader; string IsoName;
+ const Module* bootModule; + bootModule = module.project.LocateModule ( module.name == "livecdregtest" + ? "isobtrt" + : "isoboot" ); + const FileLocation *isoboot = bootModule->output; if (module.name == "livecdregtest") - { - bootloader = "isobtrt_isobtrt.o"; IsoName = "ReactOS-LiveCD-RegTest.iso"; - } else - { - bootloader = "isoboot_isoboot.o"; IsoName = "ReactOS-LiveCD.iso"; - } - - FileLocation isoboot ( OutputDirectory, "boot" + sSep + "freeldr" + sSep + "bootsect", bootloader );
string reactosDirectory = "reactos"; string livecdReactosNoFixup = livecdDirectory + sSep + reactosDirectory; @@ -3683,7 +3682,7 @@ fprintf ( fMakefile, "%s: all %s %s $(MKHIVE_TARGET) $(CDMAKE_TARGET)\n", module.name.c_str (), - backend->GetFullName ( isoboot) .c_str (), + backend->GetFullName ( *isoboot) .c_str (), backend->GetFullPath ( livecdReactos ).c_str () ); OutputModuleCopyCommands ( livecdDirectory, reactosDirectory ); @@ -3695,7 +3694,7 @@ fprintf ( fMakefile, "\t$(ECHO_CDMAKE)\n" ); fprintf ( fMakefile, "\t$(Q)$(CDMAKE_TARGET) -v -m -j -b %s %s REACTOS %s\n", - backend->GetFullName( isoboot ).c_str (), + backend->GetFullName( *isoboot ).c_str (), backend->GetFullPath ( livecd ).c_str (), IsoName.c_str() ); fprintf ( fMakefile,
Modified: trunk/reactos/tools/rbuild/module.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?rev... ============================================================================== --- trunk/reactos/tools/rbuild/module.cpp (original) +++ trunk/reactos/tools/rbuild/module.cpp Tue Nov 6 15:36:16 2007 @@ -991,7 +991,7 @@ case BootLoader: return ".sys"; case BootSector: - return "_" + this->name + ".o"; + return ".o"; case Iso: case LiveIso: case IsoRegTest: