Author: hpoussin
Date: Thu Sep 6 11:46:48 2007
New Revision: 28894
URL:
http://svn.reactos.org/svn/reactos?rev=28894&view=rev
Log:
Add method to get target arch in rbuild
Modified:
trunk/reactos/tools/rbuild/project.cpp
trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/tools/rbuild/project.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/project.cpp?r…
==============================================================================
--- trunk/reactos/tools/rbuild/project.cpp (original)
+++ trunk/reactos/tools/rbuild/project.cpp Thu Sep 6 11:46:48 2007
@@ -35,6 +35,12 @@
return "";
}
+string
+Environment::GetArch ()
+{
+ return GetEnvironmentVariablePathOrDefault ( "ROS_ARCH", "i386" );
+}
+
/* static */ string
Environment::GetEnvironmentVariablePathOrDefault ( const string& name,
const string& defaultValue )
@@ -50,7 +56,7 @@
Environment::GetIntermediatePath ()
{
string defaultIntermediate =
- string( "obj-" ) + GetEnvironmentVariablePathOrDefault (
"ROS_CDOUTPUT", "i386" );
+ string( "obj-" ) + GetArch ();
return GetEnvironmentVariablePathOrDefault ( "ROS_INTERMEDIATE",
defaultIntermediate );
}
@@ -59,7 +65,7 @@
Environment::GetOutputPath ()
{
string defaultOutput =
- string( "output-" ) + GetEnvironmentVariablePathOrDefault (
"ROS_CDOUTPUT", "i386" );
+ string( "output-" ) + GetArch ();
return GetEnvironmentVariablePathOrDefault ( "ROS_OUTPUT",
defaultOutput );
}
@@ -67,8 +73,7 @@
/* static */ string
Environment::GetInstallPath ()
{
- string defaultInstall =
- string( "reactos." ) + GetEnvironmentVariablePathOrDefault (
"ROS_CDOUTPUT", "" );
+ string defaultInstall = GetCdOutputPath ();
return GetEnvironmentVariablePathOrDefault ( "ROS_INSTALL",
defaultInstall );
}
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 (original)
+++ trunk/reactos/tools/rbuild/rbuild.h Thu Sep 6 11:46:48 2007
@@ -153,6 +153,7 @@
{
public:
static std::string GetVariable ( const std::string& name );
+ static std::string GetArch ();
static std::string GetIntermediatePath ();
static std::string GetOutputPath ();
static std::string GetCdOutputPath ();