mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
store pointer to Backend in the Project class so properties of the Backend object can eventually be queried from the generic rbuild code
svn path=/trunk/; revision=19827
This commit is contained in:
parent
bb4c8ed5ee
commit
5e6a2214be
3 changed files with 20 additions and 8 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <assert.h>
|
||||
|
||||
#include "rbuild.h"
|
||||
#include "backend/backend.h"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
@ -87,13 +88,15 @@ Project::Project ( const Configuration& configuration,
|
|||
node (NULL),
|
||||
head (NULL),
|
||||
configuration (configuration)
|
||||
{
|
||||
{
|
||||
ReadXml();
|
||||
}
|
||||
|
||||
Project::~Project ()
|
||||
{
|
||||
size_t i;
|
||||
if ( _backend )
|
||||
delete _backend;
|
||||
for ( i = 0; i < modules.size (); i++ )
|
||||
delete modules[i];
|
||||
for ( i = 0; i < linkerFlags.size (); i++ )
|
||||
|
|
|
@ -243,17 +243,19 @@ main ( int argc, char** argv )
|
|||
try
|
||||
{
|
||||
string projectFilename ( RootXmlFile );
|
||||
|
||||
printf ( "Reading build files..." );
|
||||
Project project ( configuration, projectFilename );
|
||||
printf ( "done\n" );
|
||||
project.WriteConfigurationFile ();
|
||||
project.ExecuteInvocations ();
|
||||
Backend* backend = Backend::Factory::Create (
|
||||
|
||||
project.SetBackend ( Backend::Factory::Create (
|
||||
BuildSystem,
|
||||
project,
|
||||
configuration );
|
||||
backend->Process ();
|
||||
delete backend;
|
||||
configuration ) );
|
||||
|
||||
project.WriteConfigurationFile ();
|
||||
project.ExecuteInvocations ();
|
||||
project.GetBackend().Process();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -35,10 +35,13 @@
|
|||
#endif/*WIN32*/
|
||||
#endif/*_MSC_VER*/
|
||||
|
||||
#include <infhost.h>
|
||||
|
||||
#include "ssprintf.h"
|
||||
#include "exception.h"
|
||||
#include "xml.h"
|
||||
#include <infhost.h>
|
||||
|
||||
class Backend; // forward declaration
|
||||
|
||||
typedef std::vector<std::string> string_list;
|
||||
|
||||
|
@ -191,6 +194,7 @@ class Project
|
|||
{
|
||||
std::string xmlfile;
|
||||
XMLElement *node, *head;
|
||||
Backend* _backend;
|
||||
public:
|
||||
const Configuration& configuration;
|
||||
std::string name;
|
||||
|
@ -205,8 +209,11 @@ public:
|
|||
Project ( const Configuration& configuration,
|
||||
const std::string& filename );
|
||||
~Project ();
|
||||
void SetBackend ( Backend* backend ) { _backend = backend; }
|
||||
Backend& GetBackend() { return *_backend; }
|
||||
void WriteConfigurationFile ();
|
||||
void ExecuteInvocations ();
|
||||
|
||||
void ProcessXML ( const std::string& path );
|
||||
Module* LocateModule ( const std::string& name );
|
||||
const Module* LocateModule ( const std::string& name ) const;
|
||||
|
|
Loading…
Reference in a new issue