mirror of
https://github.com/reactos/reactos.git
synced 2026-09-13 21:29:18 +08:00
* Run build tools after parsing build files
* Generate roscfg.h svn path=/branches/xmlbuildsystem/; revision=13496
This commit is contained in:
@@ -451,6 +451,21 @@ Module::HasFileWithExtensions ( const std::string& extension1,
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
Module::InvokeModule () const
|
||||
{
|
||||
for ( size_t i = 0; i < invocations.size (); i++ )
|
||||
{
|
||||
Invoke& invoke = *invocations[i];
|
||||
string command = invoke.invokeModule->GetPath () + " " + invoke.GetParameters ();
|
||||
printf ( "Executing '%s'\n\n", command.c_str () );
|
||||
int exitcode = system ( command.c_str () );
|
||||
if ( exitcode != 0 )
|
||||
throw InvocationFailedException ( command,
|
||||
exitcode );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File::File ( const string& _name, bool _first )
|
||||
: name(_name), first(_first)
|
||||
@@ -581,6 +596,40 @@ Invoke::GetTargets () const
|
||||
return targets;
|
||||
}
|
||||
|
||||
string
|
||||
Invoke::GetParameters () const
|
||||
{
|
||||
string parameters ( "" );
|
||||
size_t i;
|
||||
for ( i = 0; i < output.size (); i++ )
|
||||
{
|
||||
if ( parameters.length () > 0)
|
||||
parameters += " ";
|
||||
InvokeFile& invokeFile = *output[i];
|
||||
if ( invokeFile.switches.length () > 0 )
|
||||
{
|
||||
parameters += invokeFile.switches;
|
||||
parameters += " ";
|
||||
}
|
||||
parameters += invokeFile.name;
|
||||
}
|
||||
|
||||
for ( i = 0; i < input.size (); i++ )
|
||||
{
|
||||
if ( parameters.length () > 0 )
|
||||
parameters += " ";
|
||||
InvokeFile& invokeFile = *input[i];
|
||||
if ( invokeFile.switches.length () > 0 )
|
||||
{
|
||||
parameters += invokeFile.switches;
|
||||
parameters += " ";
|
||||
}
|
||||
parameters += invokeFile.name ;
|
||||
}
|
||||
|
||||
return parameters;
|
||||
}
|
||||
|
||||
|
||||
InvokeFile::InvokeFile ( const XMLElement& _node,
|
||||
const string& _name )
|
||||
|
||||
Reference in New Issue
Block a user