fixed some dependency issues, verbose support, 'make clean' gets more
[reactos.git] / reactos / tools / rbuild / module.cpp
index 1ee50a5..c9e3504 100644 (file)
@@ -174,10 +174,10 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
        }\r
        else if ( e.name == "library" && e.value.size () )\r
        {\r
-               if ( pIf )\r
+               /*if ( pIf )\r
                        throw InvalidBuildFileException (\r
                                e.location,\r
-                               "<library> is not a valid sub-element of <if>" );\r
+                               "<library> is not a valid sub-element of <if>" );*/\r
                libraries.push_back ( new Library ( e, *this, e.value ) );\r
                subs_invalid = true;\r
        }\r
@@ -528,13 +528,20 @@ Library::Library ( const XMLElement& _node,
                    const string& _name )\r
        : node(_node),\r
          module(_module),\r
-         name(_name)\r
+         name(_name),\r
+         imported_module(_module.project.LocateModule(_name))\r
 {\r
        if ( module.name == name )\r
                throw InvalidBuildFileException (\r
                        node.location,\r
                        "module '%s' cannot link against itself",\r
                        name.c_str() );\r
+       if ( !imported_module )\r
+               throw InvalidBuildFileException (\r
+                       node.location,\r
+                       "module '%s' trying to import non-existant module '%s'",\r
+                       module.name.c_str(),\r
+                       name.c_str() );\r
 }\r
 \r
 void\r