Author: hpoussin
Date: Mon Aug 10 00:03:04 2009
New Revision: 42575
URL:
http://svn.reactos.org/svn/reactos?rev=42575&view=rev
Log:
[rbuild] Remove distinction between Iso/IsoRegTest, and LiveIso/LiveIsoRegTest module
types
Better dependency tracking for iso module type
Modified:
trunk/reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild
trunk/reactos/boot/bootdata/bootdata.rbuild
trunk/reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild
trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp
trunk/reactos/tools/rbuild/backend/dependencymap/dependencymap.cpp
trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h
trunk/reactos/tools/rbuild/backend/versionreport/versionreport.cpp
trunk/reactos/tools/rbuild/bootstrap.cpp
trunk/reactos/tools/rbuild/module.cpp
trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/bootcdregtes…
==============================================================================
--- trunk/reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild [iso-8859-1]
(original)
+++ trunk/reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild [iso-8859-1] Mon Aug 10
00:03:04 2009
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="bootcdregtest" type="isoregtest"
output="ReactOS-RegTest.iso">
+<module name="bootcdregtest" type="iso"
output="ReactOS-RegTest.iso">
<bootsector>isobtrt</bootsector>
+ <cdfile installbase="$(CDOUTPUT)">unattend.inf</cdfile>
</module>
Modified: trunk/reactos/boot/bootdata/bootdata.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/bootdata.rbu…
==============================================================================
--- trunk/reactos/boot/bootdata/bootdata.rbuild [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/bootdata.rbuild [iso-8859-1] Mon Aug 10 00:03:04 2009
@@ -11,7 +11,7 @@
<cdfile installbase="$(CDOUTPUT)"
nameoncd="hivesft.inf">hivesft_$(ARCH).inf</cdfile>
<cdfile installbase="$(CDOUTPUT)"
nameoncd="hivesys.inf">hivesys_$(ARCH).inf</cdfile>
<cdfile installbase="$(CDOUTPUT)">txtsetup.sif</cdfile>
- <cdfile installbase="$(CDOUTPUT)">unattend.inf</cdfile>
+ <cdfile installbase="$(CDOUTPUT)"
nameoncd="unattend.inf.sample">unattend.inf</cdfile>
<directory name="bootcd">
<xi:include href="bootcd/bootcd.rbuild" />
Modified: trunk/reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/livecdregtes…
==============================================================================
--- trunk/reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild [iso-8859-1]
(original)
+++ trunk/reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild [iso-8859-1] Mon Aug 10
00:03:04 2009
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="livecdregtest" type="liveisoregtest"
output="ReactOS-LiveCD-RegTest.iso">
+<module name="livecdregtest" type="liveiso"
output="ReactOS-LiveCD-RegTest.iso">
<bootsector>isobtrt</bootsector>
</module>
Modified: trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/codeb…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] Mon Aug 10
00:03:04 2009
@@ -317,9 +317,7 @@
Module& module = *p->second;
if ((module.type != Iso) &&
- (module.type != LiveIso) &&
- (module.type != IsoRegTest) &&
- (module.type != LiveIsoRegTest))
+ (module.type != LiveIso))
{
std::string Cbp_file = CbpFileName ( module );
fprintf ( OUT, "\t\t<Project filename=\"%s\">\r\n",
Cbp_file.c_str());
@@ -384,8 +382,6 @@
{
case Iso:
case LiveIso:
- case IsoRegTest:
- case LiveIsoRegTest:
return;
default:
break;
Modified: trunk/reactos/tools/rbuild/backend/dependencymap/dependencymap.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/depen…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/dependencymap/dependencymap.cpp [iso-8859-1]
(original)
+++ trunk/reactos/tools/rbuild/backend/dependencymap/dependencymap.cpp [iso-8859-1] Mon
Aug 10 00:03:04 2009
@@ -98,9 +98,7 @@
{
Module& module = *p->second;
if ((module.type != Iso) &&
- (module.type != LiveIso) &&
- (module.type != IsoRegTest) &&
- (module.type != LiveIsoRegTest))
+ (module.type != LiveIso))
{
vector<const IfableData*> ifs_list;
ifs_list.push_back ( &module.project.non_if_data );
Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] Mon Aug 10 00:03:04
2009
@@ -59,8 +59,6 @@
{ HostFalse, "", "", "" }, // Win32SCR
{ HostFalse, "", "", "" }, // IdlHeader
{ HostFalse, "", "", "" }, // IdlInterface
- { HostFalse, "", "", "" }, // IsoRegTest
- { HostFalse, "", "", "" }, // LiveIsoRegTest
{ HostFalse, "", "", "" }, // EmbeddedTypeLib
{ HostFalse, "", "", "" }, // ElfExecutable
{ HostFalse, "", "", "" }, // RpcProxy
@@ -544,10 +542,6 @@
return false;
if ( module.type == LiveIso )
return false;
- if ( module.type == IsoRegTest )
- return false;
- if ( module.type == LiveIsoRegTest )
- return false;
if ( module.type == Test )
return false;
if ( module.type == Alias )
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 [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Mon Aug 10
00:03:04 2009
@@ -232,12 +232,6 @@
handler = new MingwIsoModuleHandler ( module );
break;
case LiveIso:
- handler = new MingwLiveIsoModuleHandler ( module );
- break;
- case IsoRegTest:
- handler = new MingwIsoModuleHandler ( module );
- break;
- case LiveIsoRegTest:
handler = new MingwLiveIsoModuleHandler ( module );
break;
case Test:
@@ -2973,7 +2967,8 @@
void
MingwIsoModuleHandler::OutputBootstrapfileCopyCommands (
- const string& bootcdDirectory )
+ const string& bootcdDirectory,
+ vector<FileLocation>& destinations )
{
for ( std::map<std::string, Module*>::const_iterator p =
module.project.modules.begin (); p != module.project.modules.end (); ++ p )
{
@@ -2987,14 +2982,16 @@
? bootcdDirectory + sSep + m.bootstrap->base
: bootcdDirectory,
m.bootstrap->nameoncd );
- OutputCopyCommand ( *m.output, targetFile );
+ OutputCopyCommandSingle ( *m.output, targetFile );
+ destinations.push_back ( targetFile );
}
}
}
void
MingwIsoModuleHandler::OutputCdfileCopyCommands (
- const string& bootcdDirectory )
+ const string& bootcdDirectory,
+ std::vector<FileLocation>& destinations )
{
for ( size_t i = 0; i < module.project.cdfiles.size (); i++ )
{
@@ -3004,7 +3001,19 @@
? bootcdDirectory + sSep +
cdfile.target->relative_path
: bootcdDirectory,
cdfile.target->name );
- OutputCopyCommand ( *cdfile.source, targetFile );
+ OutputCopyCommandSingle ( *cdfile.source, targetFile );
+ destinations.push_back ( targetFile );
+ }
+ for ( size_t i = 0; i < module.cdfiles.size (); i++ )
+ {
+ const CDFile& cdfile = *module.cdfiles[i];
+ FileLocation targetFile ( OutputDirectory,
+ cdfile.target->relative_path.length () > 0
+ ? bootcdDirectory + sSep +
cdfile.target->relative_path
+ : bootcdDirectory,
+ cdfile.target->name );
+ OutputCopyCommandSingle ( *cdfile.source, targetFile );
+ destinations.push_back ( targetFile );
}
}
@@ -3092,25 +3101,13 @@
MingwIsoModuleHandler::GenerateIsoModuleTarget ()
{
fprintf ( fMakefile, "# ISO MODULE TARGET\n" );
- string bootcdDirectory = "cd";
+ string bootcdDirectory = module.name;
FileLocation bootcd ( OutputDirectory,
bootcdDirectory,
"" );
FileLocation bootcdReactos ( OutputDirectory,
bootcdDirectory + sSep + Environment::GetCdOutputPath (),
"" );
- vector<FileLocation> vSourceFiles, vCdFiles;
- vector<FileLocation> vCdDirectories;
-
- // unattend.inf
- FileLocation srcunattend ( SourceDirectory,
- "boot" + sSep + "bootdata" + sSep +
"bootcdregtest",
- "unattend.inf" );
- FileLocation tarunattend ( bootcdReactos.directory,
- bootcdReactos.relative_path,
- "unattend.inf" );
- if (module.type == IsoRegTest)
- vSourceFiles.push_back ( srcunattend );
// bootsector
const Module* bootModule = module.bootSector->bootSectorModule;
@@ -3124,7 +3121,6 @@
}
const FileLocation *isoboot = bootModule->output;
- vSourceFiles.push_back ( *isoboot );
// prepare reactos.dff and reactos.inf
FileLocation reactosDff ( SourceDirectory,
@@ -3134,31 +3130,18 @@
bootcdReactos.relative_path,
"reactos.inf" );
- vSourceFiles.push_back ( reactosDff );
-
/*
We use only the name and not full FileLocation(ouput) because Iso/LiveIso are an
exception to the general rule.
Iso/LiveIso outputs are generated in code base root
*/
string IsoName = module.output->name;
- string sourceFiles = v2s ( backend, vSourceFiles, 5 );
-
- // fill cdrom
- GetCdDirectories ( vCdDirectories, bootcdDirectory );
- GetCdFiles ( vCdFiles );
- string cdDirectories = "";//v2s ( vCdDirectories, 5 );
- string cdFiles = v2s ( backend, vCdFiles, 5 );
-
- fprintf ( fMakefile, ".PHONY: %s\n\n",
- module.name.c_str ());
- fprintf ( fMakefile,
- "%s: all %s %s %s $(CABMAN_TARGET) $(CDMAKE_TARGET) %s\n",
+ fprintf ( fMakefile, ".PHONY: %s_CABINET\n\n",
+ module.name.c_str () );
+ fprintf ( fMakefile, "%s_CABINET: all $(CABMAN_TARGET) %s | %s\n",
module.name.c_str (),
- backend->GetFullName ( *isoboot ).c_str (),
- sourceFiles.c_str (),
- cdFiles.c_str (),
- cdDirectories.c_str () );
+ backend->GetFullName ( reactosDff ).c_str (),
+ backend->GetFullPath ( bootcdReactos ).c_str () );
fprintf ( fMakefile,
"\t$(Q)$(CABMAN_TARGET) -C %s -L %s -I -P $(OUTPUT)\n",
backend->GetFullName ( reactosDff ).c_str (),
@@ -3169,13 +3152,29 @@
backend->GetFullName ( reactosInf ).c_str (),
backend->GetFullPath ( bootcdReactos ).c_str ());
fprintf ( fMakefile,
- "\t-@${rm} %s 2>$(NUL)\n",
+ "\t-@${rm} %s 2>$(NUL)\n\n",
backend->GetFullName ( reactosInf ).c_str () );
- OutputBootstrapfileCopyCommands ( bootcdDirectory );
- OutputCdfileCopyCommands ( bootcdDirectory );
-
- if (module.type == IsoRegTest)
- OutputCopyCommand ( srcunattend, tarunattend );
+
+ std::vector<FileLocation> sourceFiles;
+ OutputBootstrapfileCopyCommands ( bootcdDirectory, sourceFiles );
+ OutputCdfileCopyCommands ( bootcdDirectory, sourceFiles );
+
+ fprintf( fMakefile,
+ "\n%s_OBJS := %s\n\n",
+ module.name.c_str (),
+ v2s ( backend, sourceFiles, 5 ).c_str () );
+
+ fprintf ( fMakefile, ".PHONY: %s\n\n",
+ module.name.c_str ());
+ fprintf ( fMakefile,
+ "%s: $(%s_OBJS) %s_CABINET %s $(CDMAKE_TARGET) | %s\n",
+ module.name.c_str (),
+ module.name.c_str (),
+ module.name.c_str (),
+ backend->GetFullName ( *isoboot ).c_str (),
+ backend->GetFullPath ( FileLocation ( OutputDirectory,
+ bootcdDirectory,
+ "" ) ).c_str () );
fprintf ( fMakefile, "\t$(ECHO_CDMAKE)\n" );
fprintf ( fMakefile,
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h [iso-8859-1] Mon Aug 10
00:03:04 2009
@@ -323,8 +323,10 @@
void GetBootstrapCdFiles ( std::vector<FileLocation>& out ) const;
void GetNonModuleCdFiles ( std::vector<FileLocation>& out ) const;
void GetCdFiles ( std::vector<FileLocation>& out ) const;
- void OutputBootstrapfileCopyCommands ( const std::string& bootcdDirectory );
- void OutputCdfileCopyCommands ( const std::string& bootcdDirectory );
+ void OutputBootstrapfileCopyCommands ( const std::string& bootcdDirectory,
+ std::vector<FileLocation>& destinations
);
+ void OutputCdfileCopyCommands ( const std::string& bootcdDirectory,
+ std::vector<FileLocation>& destinations );
};
Modified: trunk/reactos/tools/rbuild/backend/versionreport/versionreport.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/versi…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/versionreport/versionreport.cpp [iso-8859-1]
(original)
+++ trunk/reactos/tools/rbuild/backend/versionreport/versionreport.cpp [iso-8859-1] Mon
Aug 10 00:03:04 2009
@@ -96,9 +96,7 @@
{
Module& module = *p->second;
if ((module.type != Iso) &&
- (module.type != LiveIso) &&
- (module.type != IsoRegTest) &&
- (module.type != LiveIsoRegTest))
+ (module.type != LiveIso))
{
Module& module = *p->second;
Modified: trunk/reactos/tools/rbuild/bootstrap.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/bootstrap.cpp…
==============================================================================
--- trunk/reactos/tools/rbuild/bootstrap.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/bootstrap.cpp [iso-8859-1] Mon Aug 10 00:03:04 2009
@@ -63,8 +63,6 @@
case ObjectLibrary:
case Iso:
case LiveIso:
- case IsoRegTest:
- case LiveIsoRegTest:
case Test:
case RpcServer:
case RpcClient:
Modified: trunk/reactos/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] Mon Aug 10 00:03:04 2009
@@ -525,6 +525,8 @@
delete linkerFlags[i];
for ( i = 0; i < stubbedComponents.size(); i++ )
delete stubbedComponents[i];
+ for ( i = 0; i < cdfiles.size (); i++ )
+ delete cdfiles[i];
if ( linkerScript )
delete linkerScript;
if ( pch )
@@ -917,6 +919,12 @@
autoRegister = new AutoRegister ( project, this, e );
subs_invalid = true;
}
+ else if ( e.name == "cdfile" )
+ {
+ CDFile* cdfile = new CDFile ( project, e, subpath );
+ cdfiles.push_back ( cdfile );
+ subs_invalid = true;
+ }
if ( subs_invalid && e.subElements.size() > 0 )
{
throw XMLInvalidBuildFileException (
@@ -924,6 +932,8 @@
"<%s> cannot have sub-elements",
e.name.c_str() );
}
+ for ( size_t i = 0; i < cdfiles.size (); i++ )
+ cdfiles[i]->ProcessXML ();
for ( size_t i = 0; i < e.subElements.size (); i++ )
ProcessXMLSubElement ( *e.subElements[i], subdirectory, subpath, parseContext );
parseContext.compilationUnit = pOldCompilationUnit;
@@ -972,10 +982,6 @@
return Iso;
if ( attribute.value == "liveiso" )
return LiveIso;
- if ( attribute.value == "isoregtest" )
- return IsoRegTest;
- if ( attribute.value == "liveisoregtest" )
- return LiveIsoRegTest;
if ( attribute.value == "test" )
return Test;
if ( attribute.value == "rpcserver" )
@@ -1026,8 +1032,6 @@
case BootProgram:
case Iso:
case LiveIso:
- case IsoRegTest:
- case LiveIsoRegTest:
case ElfExecutable:
case Cabinet:
return OutputDirectory;
@@ -1089,8 +1093,6 @@
return ".o";
case Iso:
case LiveIso:
- case IsoRegTest:
- case LiveIsoRegTest:
return ".iso";
case Test:
return ".exe";
@@ -1149,8 +1151,6 @@
case BootSector:
case Iso:
case LiveIso:
- case IsoRegTest:
- case LiveIsoRegTest:
case RpcServer:
case RpcClient:
case RpcProxy:
@@ -1202,8 +1202,6 @@
case BootSector:
case Iso:
case LiveIso:
- case IsoRegTest:
- case LiveIsoRegTest:
case RpcServer:
case RpcClient:
case RpcProxy:
@@ -1259,8 +1257,6 @@
case BootSector:
case Iso:
case LiveIso:
- case IsoRegTest:
- case LiveIsoRegTest:
case RpcServer:
case RpcClient:
case RpcProxy:
@@ -1317,8 +1313,6 @@
case BootProgram:
case Iso:
case LiveIso:
- case IsoRegTest:
- case LiveIsoRegTest:
case RpcServer:
case RpcClient:
case RpcProxy:
@@ -1762,9 +1756,7 @@
Bootsector::IsSupportedModuleType ( ModuleType type )
{
if ( type == Iso ||
- type == LiveIso ||
- type == IsoRegTest ||
- type == LiveIsoRegTest )
+ type == LiveIso )
{
return true;
}
Modified: trunk/reactos/tools/rbuild/rbuild.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=…
==============================================================================
--- trunk/reactos/tools/rbuild/rbuild.h [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/rbuild.h [iso-8859-1] Mon Aug 10 00:03:04 2009
@@ -315,8 +315,6 @@
Win32SCR,
IdlHeader,
IdlInterface,
- IsoRegTest,
- LiveIsoRegTest,
EmbeddedTypeLib,
ElfExecutable,
RpcProxy,
@@ -392,6 +390,7 @@
std::vector<CompilerFlag*> compilerFlags;
std::vector<LinkerFlag*> linkerFlags;
std::vector<StubbedComponent*> stubbedComponents;
+ std::vector<CDFile*> cdfiles;
LinkerScript* linkerScript;
PchFile* pch;
bool cplusplus;