build: assert on missing dependency
authorAndrew Tridgell <tridge@samba.org>
Mon, 8 Mar 2010 21:17:26 +0000 (08:17 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:47 +0000 (20:26 +1000)
buildtools/wafsamba/samba_utils.py

index 40a7536b4ca919354472204aca70d1ec1f6109cd..7a1d56e22aab38dbe871403dd7528ca8c073c5b1 100644 (file)
@@ -168,8 +168,8 @@ def process_depends_on(self):
         lst = self.to_list(self.depends_on)
         for x in lst:
             y = self.bld.name_to_obj(x, self.env)
+            self.bld.ASSERT(y is not None, "Failed to find dependency %s of %s" % (x, self.name))
             y.post()
-
             if getattr(y, 'more_includes', None):
                   self.includes += " " + y.more_includes
 
@@ -269,3 +269,15 @@ def ENFORCE_GROUP_ORDERING(bld):
                         t.post()
 Build.BuildContext.ENFORCE_GROUP_ORDERING = ENFORCE_GROUP_ORDERING
 
+# @feature('cc')
+# @before('apply_lib_vars')
+# def process_objects(self):
+#     if getattr(self, 'add_objects', None):
+#         lst = self.to_list(self.add_objects)
+#         for x in lst:
+#             y = self.name_to_obj(x)
+#             if not y:
+#                 raise Utils.WafError('object %r was not found in uselib_local (required by add_objects %r)' % (x, self.name))
+#             y.post()
+#             self.env.append_unique('INC_PATHS', y.env.INC_PATHS)
+