Author: hpoussin
Date: Tue Oct 9 11:10:05 2007
New Revision: 29465
URL:
http://svn.reactos.org/svn/reactos?rev=29465&view=rev
Log:
Put .asm files at the end of the module
See issue #2702 for more details.
Modified:
trunk/reactos/tools/rbuild/module.cpp
trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/module.cpp (original)
+++ trunk/reactos/tools/rbuild/module.cpp Tue Oct 9 11:10:05 2007
@@ -183,6 +183,11 @@
return filename;
}
+IfableData::IfableData( )
+ : asmFiles ( 0 )
+{
+}
+
void IfableData::ExtractModules( std::vector<Module*> &modules )
{
size_t i;
@@ -582,11 +587,27 @@
parseContext.ifData->data.compilationUnits.push_back ( pCompilationUnit );
else
{
- string ext = GetExtension ( e.value );
- if ( !stricmp ( ext.c_str(), ".idl" ) )
- non_if_data.compilationUnits.insert ( non_if_data.compilationUnits.begin(),
pCompilationUnit );
+ string ext = ToLower ( GetExtension ( e.value ) );
+ if ( ext == ".idl" )
+ {
+ // put .idl files at the start of the module
+ non_if_data.compilationUnits.insert (
+ non_if_data.compilationUnits.begin(),
+ pCompilationUnit );
+ }
+ else if ( ext == ".asm" || ext == ".s" )
+ {
+ // put .asm files at the end of the module
+ non_if_data.compilationUnits.push_back ( pCompilationUnit );
+ non_if_data.asmFiles++;
+ }
else
- non_if_data.compilationUnits.push_back ( pCompilationUnit );
+ {
+ // put other files in the middle
+ non_if_data.compilationUnits.insert (
+ non_if_data.compilationUnits.end() - non_if_data.asmFiles,
+ pCompilationUnit );
+ }
}
}
if ( parseContext.ifData )
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 Tue Oct 9 11:10:05 2007
@@ -214,7 +214,9 @@
std::vector<Module*> modules;
std::vector<CompilerFlag*> compilerFlags;
std::vector<If*> ifs;
-
+ int asmFiles; // number of .asm files in compilationUnits
+
+ IfableData();
~IfableData();
void ProcessXML();
void ExtractModules( std::vector<Module*> &modules );