Take care of ROS_AUTOMAKE variable in rbuild

svn path=/trunk/; revision=26241
This commit is contained in:
Hervé Poussineau 2007-04-01 20:47:00 +00:00
parent f32c6a7cd9
commit 4b824a0114
3 changed files with 13 additions and 4 deletions

View file

@ -267,7 +267,8 @@ MingwBackend::CloseMakefile () const
void
MingwBackend::GenerateHeader () const
{
fprintf ( fMakefile, "# THIS FILE IS AUTOMATICALLY GENERATED, EDIT 'ReactOS.rbuild' INSTEAD\n\n" );
fprintf ( fMakefile, "# THIS FILE IS AUTOMATICALLY GENERATED, EDIT '%s' INSTEAD\n\n",
ProjectNode.GetProjectFilename ().c_str () );
}
string

View file

@ -80,6 +80,13 @@ Environment::GetCdOutputPath ()
"reactos" );
}
/* static */ string
Environment::GetAutomakeFile ( const std::string& defaultFile )
{
return GetEnvironmentVariablePathOrDefault ( "ROS_AUTOMAKE",
defaultFile );
}
ParseContext::ParseContext ()
: ifData (NULL),
compilationUnit (NULL)
@ -284,7 +291,7 @@ Project::ProcessXML ( const string& path )
att = node->GetAttribute ( "makefile", true );
assert(att);
makefile = att->value;
makefile = Environment::GetAutomakeFile ( att->value );
size_t i;
for ( i = 0; i < node->subElements.size (); i++ )
@ -465,7 +472,7 @@ Project::LocateModule ( const string& name ) const
return NULL;
}
std::string
const std::string&
Project::GetProjectFilename () const
{
return xmlfile;

View file

@ -157,6 +157,7 @@ public:
static std::string GetOutputPath ();
static std::string GetCdOutputPath ();
static std::string GetInstallPath ();
static std::string GetAutomakeFile ( const std::string& defaultFile );
static std::string GetEnvironmentVariablePathOrDefault ( const std::string& name,
const std::string& defaultValue );
};
@ -224,7 +225,7 @@ public:
void ProcessXML ( const std::string& path );
Module* LocateModule ( const std::string& name );
const Module* LocateModule ( const std::string& name ) const;
std::string GetProjectFilename () const;
const std::string& GetProjectFilename () const;
std::string ResolveProperties ( const std::string& s ) const;
private:
std::string ResolveNextProperty ( std::string& s ) const;