waf: improved error message for bad paths in SAMBA_LIBRARY()
authorAndrew Tridgell <tridge@samba.org>
Thu, 17 Feb 2011 04:14:57 +0000 (15:14 +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/wafsamba.py

index 4c9bf053a157c46f7af0eb33f1633fac7cd2af97..8c4296605741d84104648f17d1b4fd9ecf9aad95 100644 (file)
@@ -218,7 +218,13 @@ def SAMBA_LIBRARY(bld, libname, source,
             bld.ABI_VSCRIPT(libname, abi_directory, version, vscript,
                             abi_match)
             fullname = apply_pattern(bundled_name, bld.env.shlib_PATTERN)
-            bld.add_manual_dependency(bld.path.find_or_declare(fullname), bld.path.find_or_declare(vscript))
+            fullpath = bld.path.find_or_declare(fullname)
+            vscriptpath = bld.path.find_or_declare(vscript)
+            if not fullpath:
+                raise Utils.WafError("unable to find fullpath for %s" % fullname)
+            if not vscriptpath:
+                raise Utils.WafError("unable to find vscript path for %s" % vscript)
+            bld.add_manual_dependency(fullpath, vscriptpath)
             if Options.is_install:
                 # also make the .inst file depend on the vscript
                 instname = apply_pattern(bundled_name + '.inst', bld.env.shlib_PATTERN)