added 'first' attribute to <file>
authorRoyce Mitchell III <royce3@ev1.net>
Wed, 19 Jan 2005 01:37:35 +0000 (01:37 +0000)
committerRoyce Mitchell III <royce3@ev1.net>
Wed, 19 Jan 2005 01:37:35 +0000 (01:37 +0000)
svn path=/branches/xmlbuildsystem/; revision=13129

reactos/ntoskrnl/ntoskrnl.xml
reactos/tools/rbuild/backend/mingw/modulehandler.cpp
reactos/tools/rbuild/module.cpp
reactos/tools/rbuild/rbuild.h

index 53672a8..19b8369 100644 (file)
                </output>\r
        </invoke>\r
 \r
-       <directory name="ke"> <!-- leave this at the top -->\r
+       <directory name="ke">\r
                <if property="ARCH" value="i386">\r
                        <directory name="i386">\r
-                               <file>multiboot.S</file> <!-- leave this at the top -->\r
+                               <file first>multiboot.S</file>\r
                                <file>bios.c</file>\r
                                <file>brkpoint.c</file>\r
                                <file>bthread.S</file>\r
index f353b81..5aed452 100644 (file)
@@ -447,6 +447,17 @@ MingwModuleHandler::GenerateMacros (
        \r
        if ( files.size() )\r
        {\r
+               for ( i = 0; i < files.size(); i++ )\r
+               {\r
+                       if ( files[i]->first )\r
+                       {\r
+                               fprintf ( fMakefile,\r
+                                       "%s := %s $(%s)\n",\r
+                                       objs_macro.c_str(),\r
+                                       GetObjectFilename(files[i]->name).c_str(),\r
+                                       objs_macro.c_str() );\r
+                       }\r
+               }\r
                fprintf (\r
                        fMakefile,\r
                        "%s %s",\r
@@ -455,7 +466,9 @@ MingwModuleHandler::GenerateMacros (
                for ( i = 0; i < files.size(); i++ )\r
                {\r
                        string extension = GetExtension ( files[i]->name );\r
-                       if ( extension != ".spec" && extension != ".SPEC" )\r
+                       if ( extension != ".spec"\r
+                         && extension != ".SPEC"\r
+                         && !files[i]->first )\r
                        {\r
                                fprintf (\r
                                        fMakefile,\r
index 0481f32..f4a2af7 100644 (file)
@@ -102,7 +102,9 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
        string subpath ( path );\r
        if ( e.name == "file" && e.value.size () > 0 )\r
        {\r
-               File* pFile = new File ( FixSeparator ( path + CSEP + e.value ) );\r
+               const XMLAttribute* att = e.GetAttribute ( "first", false );\r
+               File* pFile = new File ( FixSeparator ( path + CSEP + e.value ),\r
+                                        att != NULL );\r
                if ( pIf )\r
                        pIf->files.push_back ( pFile );\r
                else\r
@@ -323,8 +325,8 @@ Module::GetInvocationTarget ( const int index ) const
 }\r
 \r
 \r
-File::File ( const string& _name )\r
-       : name(_name)\r
+File::File ( const string& _name, bool _first )\r
+       : name(_name), first(_first)\r
 {\r
 }\r
 \r
index a7781d2..864a975 100644 (file)
@@ -168,8 +168,9 @@ class File
 {\r
 public:\r
        std::string name;\r
+       bool first;\r
 \r
-       File ( const std::string& _name );\r
+       File ( const std::string& _name, bool _first );\r
 \r
        void ProcessXML();\r
 };\r