waf: give a more sensible error on symlink_bin with missing directory
authorAndrew Tridgell <tridge@samba.org>
Thu, 17 Feb 2011 03:03:13 +0000 (14:03 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 18 Feb 2011 04:09:47 +0000 (15:09 +1100)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

buildtools/wafsamba/samba_install.py

index 5902d731f65cf0a3dd06589c4db812ea819e8adb..f25fd543e32a1943eb183b2218f7b03e88f01b01 100644 (file)
@@ -211,6 +211,8 @@ def symlink_bin(self):
         return
 
     blddir = os.path.dirname(self.bld.srcnode.abspath(self.bld.env))
+    if not self.link_task.outputs or not self.link_task.outputs[0]:
+        raise Utils.WafError('no outputs found for %s in symlink_bin' % self.name)
     binpath = self.link_task.outputs[0].abspath(self.env)
     bldpath = os.path.join(self.bld.env.BUILD_DIRECTORY, self.link_task.outputs[0].name)