mirror of
https://github.com/reactos/reactos.git
synced 2024-09-06 02:37:06 +00:00
Add method to get target arch in rbuild
svn path=/trunk/; revision=28894
This commit is contained in:
parent
7338e88f05
commit
0eccb4aa9d
|
@ -35,6 +35,12 @@ Environment::GetVariable ( const string& name )
|
|||
return "";
|
||||
}
|
||||
|
||||
string
|
||||
Environment::GetArch ()
|
||||
{
|
||||
return GetEnvironmentVariablePathOrDefault ( "ROS_ARCH", "i386" );
|
||||
}
|
||||
|
||||
/* static */ string
|
||||
Environment::GetEnvironmentVariablePathOrDefault ( const string& name,
|
||||
const string& defaultValue )
|
||||
|
@ -50,7 +56,7 @@ Environment::GetEnvironmentVariablePathOrDefault ( const string& name,
|
|||
Environment::GetIntermediatePath ()
|
||||
{
|
||||
string defaultIntermediate =
|
||||
string( "obj-" ) + GetEnvironmentVariablePathOrDefault ( "ROS_CDOUTPUT", "i386" );
|
||||
string( "obj-" ) + GetArch ();
|
||||
return GetEnvironmentVariablePathOrDefault ( "ROS_INTERMEDIATE",
|
||||
defaultIntermediate );
|
||||
}
|
||||
|
@ -59,7 +65,7 @@ Environment::GetIntermediatePath ()
|
|||
Environment::GetOutputPath ()
|
||||
{
|
||||
string defaultOutput =
|
||||
string( "output-" ) + GetEnvironmentVariablePathOrDefault ( "ROS_CDOUTPUT", "i386" );
|
||||
string( "output-" ) + GetArch ();
|
||||
return GetEnvironmentVariablePathOrDefault ( "ROS_OUTPUT",
|
||||
defaultOutput );
|
||||
}
|
||||
|
@ -67,8 +73,7 @@ Environment::GetOutputPath ()
|
|||
/* static */ string
|
||||
Environment::GetInstallPath ()
|
||||
{
|
||||
string defaultInstall =
|
||||
string( "reactos." ) + GetEnvironmentVariablePathOrDefault ( "ROS_CDOUTPUT", "" );
|
||||
string defaultInstall = GetCdOutputPath ();
|
||||
return GetEnvironmentVariablePathOrDefault ( "ROS_INSTALL",
|
||||
defaultInstall );
|
||||
}
|
||||
|
|
|
@ -153,6 +153,7 @@ class Environment
|
|||
{
|
||||
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 ();
|
||||
|
|
Loading…
Reference in a new issue