Option to disable automatic dependencies
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.cpp
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.h
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp
Added: branches/xmlbuildsystem/reactos/tools/rbuild/configuration.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp
2005-05-19 19:00:37 UTC (rev 15412)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp
2005-05-19 19:53:01 UTC (rev 15413)
@@ -34,8 +34,7 @@
/*static*/ Backend*
Backend::Factory::Create ( const string& name,
Project& project,
- bool verbose,
- bool cleanAsYouGo )
+ Configuration& configuration )
{
string sname ( name );
strlwr ( &sname[0] );
@@ -49,14 +48,12 @@
throw UnknownBackendException ( sname );
return NULL;
}
- return (*f) ( project, verbose, cleanAsYouGo );
+ return (*f) ( project, configuration );
}
Backend::Backend ( Project& project,
- bool verbose,
- bool cleanAsYouGo )
+ Configuration& configuration )
: ProjectNode ( project ),
- verbose ( verbose ),
- cleanAsYouGo ( cleanAsYouGo )
+ configuration ( configuration )
{
}
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h
2005-05-19 19:00:37 UTC (rev 15412)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h
2005-05-19 19:53:01 UTC (rev 15413)
@@ -6,7 +6,7 @@
class Backend;
typedef Backend* BackendFactory ( Project& project,
- bool verbose );
+ Configuration& configuration );
class Backend
{
@@ -22,26 +22,22 @@
virtual ~Factory();
virtual Backend* operator() ( Project&,
- bool verbose,
- bool cleanAsYouGo ) = 0;
+ Configuration&
configuration ) = 0;
public:
static Backend* Create ( const std::string& name,
Project& project,
- bool verbose,
- bool cleanAsYouGo );
+ Configuration& configuration );
};
protected:
Backend ( Project& project,
- bool verbose,
- bool cleanAsYouGo );
+ Configuration& configuration );
public:
virtual void Process () = 0;
Project& ProjectNode;
- bool verbose;
- bool cleanAsYouGo;
+ Configuration& configuration;
};
#endif /* __BACKEND_H */
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.cpp
---
branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.cpp
2005-05-19 19:00:37 UTC (rev 15412)
+++
branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.cpp
2005-05-19 19:53:01 UTC (rev 15413)
@@ -35,18 +35,16 @@
DevCppFactory() : Factory("devcpp") {}
Backend *operator() (Project &project,
- bool verbose,
- bool cleanAsYouGo)
+ Configuration& configuration)
{
- return new DevCppBackend(project, verbose,
cleanAsYouGo);
+ return new DevCppBackend(project,
configuration);
}
} factory;
DevCppBackend::DevCppBackend(Project &project,
- bool verbose,
- bool cleanAsYouGo) : Backend(project,
verbose, cleanAsYouGo)
+ Configuration& configuration) :
Backend(project, configuration)
{
m_unitCount = 0;
}
@@ -113,8 +111,7 @@
Backend *backend = Backend::Factory::Create("mingw",
ProjectNode,
- verbose,
- cleanAsYouGo );
+ configuration );
backend->Process();
delete backend;
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.h
2005-05-19 19:00:37 UTC (rev 15412)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/devcpp/devcpp.h
2005-05-19 19:53:01 UTC (rev 15413)
@@ -20,8 +20,7 @@
public:
DevCppBackend(Project &project,
- bool verbose,
- bool cleanAsYouGo);
+ Configuration& configuration);
virtual ~DevCppBackend() {}
virtual void Process();
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
2005-05-19 19:00:37 UTC (rev 15412)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
2005-05-19 19:53:01 UTC (rev 15413)
@@ -212,20 +212,17 @@
public:
MingwFactory() : Factory ( "mingw" ) {}
Backend* operator() ( Project& project,
- bool verbose,
- bool cleanAsYouGo )
+ Configuration& configuration )
{
return new MingwBackend ( project,
- verbose,
- cleanAsYouGo );
+ configuration );
}
} factory;
MingwBackend::MingwBackend ( Project& project,
- bool verbose,
- bool cleanAsYouGo )
- : Backend ( project, verbose, cleanAsYouGo ),
+ Configuration& configuration )
+ : Backend ( project, configuration ),
intermediateDirectory ( new Directory ("$(INTERMEDIATE)" ) ),
outputDirectory ( new Directory ( "$(OUTPUT)" ) ),
installDirectory ( new Directory ( "$(INSTALL)" ) )
@@ -622,7 +619,7 @@
printf ( "Unpacking WINE resources..." );
WineResource wineResource ( ProjectNode,
GetBin2ResExecutable () );
- wineResource.UnpackResources ( verbose );
+ wineResource.UnpackResources ( configuration.Verbose );
printf ( "done\n" );
}
@@ -631,7 +628,7 @@
{
printf ( "Generating test support code..." );
TestSupportCode testSupportCode ( ProjectNode );
- testSupportCode.GenerateTestSupportCode ( verbose );
+ testSupportCode.GenerateTestSupportCode ( configuration.Verbose
);
printf ( "done\n" );
}
@@ -640,18 +637,21 @@
{
printf ( "Generating proxy makefiles..." );
ProxyMakefile proxyMakefile ( ProjectNode );
- proxyMakefile.GenerateProxyMakefiles ( verbose );
+ proxyMakefile.GenerateProxyMakefiles ( configuration.Verbose );
printf ( "done\n" );
}
void
MingwBackend::CheckAutomaticDependencies ()
{
- printf ( "Checking automatic dependencies..." );
- AutomaticDependency automaticDependency ( ProjectNode );
- automaticDependency.Process ();
- automaticDependency.CheckAutomaticDependencies ( verbose );
- printf ( "done\n" );
+ if ( configuration.AutomaticDependencies )
+ {
+ printf ( "Checking automatic dependencies..." );
+ AutomaticDependency automaticDependency ( ProjectNode );
+ automaticDependency.Process ();
+ automaticDependency.CheckAutomaticDependencies (
configuration.Verbose );
+ printf ( "done\n" );
+ }
}
bool
@@ -667,9 +667,9 @@
MingwBackend::GenerateDirectories ()
{
printf ( "Creating directories..." );
- intermediateDirectory->GenerateTree ( "", verbose );
- outputDirectory->GenerateTree ( "", verbose );
- installDirectory->GenerateTree ( "", verbose );
+ intermediateDirectory->GenerateTree ( "", configuration.Verbose
);
+ outputDirectory->GenerateTree ( "", configuration.Verbose );
+ installDirectory->GenerateTree ( "", configuration.Verbose );
printf ( "done\n" );
}
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
2005-05-19 19:00:37 UTC (rev 15412)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
2005-05-19 19:53:01 UTC (rev 15413)
@@ -46,8 +46,7 @@
{
public:
MingwBackend ( Project& project,
- bool verbose,
- bool cleanAsYouGo );
+ Configuration& configuration );
virtual ~MingwBackend ();
virtual void Process ();
std::string AddDirectoryTarget ( const std::string& directory,
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp
---
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp 2005-05-19 19:00:37 UTC (rev 15412)
+++
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp 2005-05-19 19:53:01 UTC (rev 15413)
@@ -1280,7 +1280,7 @@
void
MingwModuleHandler::GenerateCleanObjectsAsYouGoCode () const
{
- if ( backend->cleanAsYouGo )
+ if ( backend->configuration.CleanAsYouGo )
{
vector<string> objectFiles;
GetObjectsVector ( module.non_if_data,
_____
Added: branches/xmlbuildsystem/reactos/tools/rbuild/configuration.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/configuration.cpp
2005-05-19 19:00:37 UTC (rev 15412)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/configuration.cpp
2005-05-19 19:53:01 UTC (rev 15413)
@@ -0,0 +1,15 @@
+#include "pch.h"
+#include <assert.h>
+
+#include "rbuild.h"
+
+Configuration::Configuration ()
+{
+ Verbose = false;
+ CleanAsYouGo = false;
+ AutomaticDependencies = true;
+}
+
+Configuration::~Configuration ()
+{
+}
Property changes on:
branches/xmlbuildsystem/reactos/tools/rbuild/configuration.cpp
___________________________________________________________________
Name: svn:eol-style
+ native
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp
2005-05-19 19:00:37 UTC (rev 15412)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp
2005-05-19 19:53:01 UTC (rev 15413)
@@ -18,8 +18,7 @@
static string BuildSystem;
static string RootXmlFile = "ReactOS.xml";
-static bool Verbose = false;
-static bool CleanAsYouGo = false;
+static Configuration configuration;
bool
ParseSwitch ( int argc, char** argv, int index )
@@ -28,11 +27,14 @@
switch ( switchChar )
{
case 'v':
- Verbose = true;
+ configuration.Verbose = true;
break;
case 'c':
- CleanAsYouGo = true;
+ configuration.CleanAsYouGo = true;
break;
+ case 'd':
+ configuration.AutomaticDependencies = false;
+ break;
case 'r':
RootXmlFile = string(&argv[index][2]);
break;
@@ -74,6 +76,7 @@
printf ( "Switches:\n" );
printf ( " -v Be verbose\n" );
printf ( " -c Clean as you go. Delete
generated files as soon as they are not needed anymore\n" );
+ printf ( " -d Disable automatic
dependencies.\n" );
printf ( " -rfile.xml Name of the root xml file.
Default is ReactOS.xml\n" );
printf ( "\n" );
printf ( " buildsystem Target build system. Can be one
of:\n" );
@@ -91,8 +94,7 @@
project.ExecuteInvocations ();
Backend* backend = Backend::Factory::Create (
BuildSystem,
project,
- Verbose,
-
CleanAsYouGo );
+
configuration );
backend->Process ();
delete backend;
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h
2005-05-19 19:00:37 UTC (rev 15412)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h
2005-05-19 19:53:01 UTC (rev 15413)
@@ -68,6 +68,16 @@
class SourceFileTest;
+class Configuration
+{
+public:
+ Configuration ();
+ ~Configuration ();
+ bool Verbose;
+ bool CleanAsYouGo;
+ bool AutomaticDependencies;
+};
+
class Environment
{
public:
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak
--- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak
2005-05-19 19:00:37 UTC (rev 15412)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak
2005-05-19 19:53:01 UTC (rev 15413)
@@ -115,6 +115,7 @@
bootstrap.cpp \
cdfile.cpp \
compilerflag.cpp \
+ configuration.cpp \
define.cpp \
exception.cpp \
filesupportcode.cpp \
@@ -225,6 +226,10 @@
$(ECHO_CC)
${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
+$(RBUILD_INT_)configuration.o: $(RBUILD_BASE_)configuration.cpp
$(RBUILD_HEADERS) | $(RBUILD_INT)
+ $(ECHO_CC)
+ ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
+
$(RBUILD_INT_)define.o: $(RBUILD_BASE_)define.cpp $(RBUILD_HEADERS) |
$(RBUILD_INT)
$(ECHO_CC)
${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@