s4-waf: fixed waf distcheck for our standalone libs and s4
[samba.git] / buildtools / wafsamba / samba_dist.py
index 3663bc0bf5b79a1c3d37598f641a8784d0f03354..e01bebe9edaeabe47ddc5d6015a54e20396d122c 100644 (file)
@@ -18,9 +18,13 @@ def add_tarfile(tar, fname, abspath):
     fh.close()
 
 
     fh.close()
 
 
-def dist():
-    appname = Utils.g_module.APPNAME
-    version = Utils.g_module.VERSION
+def dist(appname='',version=''):
+    if not isinstance(appname, str):
+        # this copes with a mismatch in the calling arguments for dist()
+        appname = Utils.g_module.APPNAME
+        version = Utils.g_module.VERSION
+    if not version:
+        version = Utils.g_module.VERSION
 
     srcdir = os.path.normpath(os.path.join(os.path.dirname(Utils.g_module.root_path), Utils.g_module.srcdir))
 
 
     srcdir = os.path.normpath(os.path.join(os.path.dirname(Utils.g_module.root_path), Utils.g_module.srcdir))
 
@@ -58,6 +62,7 @@ def dist():
     tar.close()
 
     print('Created %s' % dist_name)
     tar.close()
 
     print('Created %s' % dist_name)
+    return dist_name
 
 
 @conf
 
 
 @conf