waf: make the error msg when gen_ndr directory is missing clearer
authorAndrew Tridgell <tridge@samba.org>
Mon, 19 Jul 2010 04:26:20 +0000 (14:26 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 19 Jul 2010 12:17:17 +0000 (22:17 +1000)
the next time someone removes gen_ndr/README the fix should be more
obvious.

buildtools/wafsamba/samba_pidl.py

index b932f59d770237792f1801a1cac421ce99a371e6..521222dc5cc34aa4e59a51397a7301b7ca40c4da 100644 (file)
@@ -79,6 +79,13 @@ def SAMBA_PIDL(bld, pname, source,
     # gen_ndr directory we end up generating identical output in gen_ndr for the old
     # build system and the new one. That makes keeping things in sync much easier.
     # eventually we should drop the gen_ndr files in git, but in the meanwhile this works
+
+    found_dir = bld.path.find_dir(output_dir)
+    if not 'abspath' in dir(found_dir):
+        Logs.error('Unable to find pidl output directory %s' %
+                   os.path.normpath(os.path.join(bld.curdir, output_dir)))
+        sys.exit(1)
+
     outdir = bld.path.find_dir(output_dir).abspath(t.env)
 
     if symlink and not os.path.lexists(outdir):