Author: hpoussin Date: Mon Apr 2 00:47:00 2007 New Revision: 26241
URL: http://svn.reactos.org/svn/reactos?rev=26241&view=rev Log: Take care of ROS_AUTOMAKE variable in rbuild
Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp trunk/reactos/tools/rbuild/project.cpp trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw/... ============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp Mon Apr 2 00:47:00 2007 @@ -267,7 +267,8 @@ 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
Modified: trunk/reactos/tools/rbuild/project.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/project.cpp?re... ============================================================================== --- trunk/reactos/tools/rbuild/project.cpp (original) +++ trunk/reactos/tools/rbuild/project.cpp Mon Apr 2 00:47:00 2007 @@ -80,6 +80,13 @@ "reactos" ); }
+/* static */ string +Environment::GetAutomakeFile ( const std::string& defaultFile ) +{ + return GetEnvironmentVariablePathOrDefault ( "ROS_AUTOMAKE", + defaultFile ); +} + ParseContext::ParseContext () : ifData (NULL), compilationUnit (NULL) @@ -284,7 +291,7 @@
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 @@ return NULL; }
-std::string +const std::string& Project::GetProjectFilename () const { return xmlfile;
Modified: trunk/reactos/tools/rbuild/rbuild.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=2... ============================================================================== --- trunk/reactos/tools/rbuild/rbuild.h (original) +++ trunk/reactos/tools/rbuild/rbuild.h Mon Apr 2 00:47:00 2007 @@ -157,6 +157,7 @@ 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 @@ 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;