From: Andrew Tridgell Date: Sun, 4 Apr 2010 23:58:23 +0000 (+1000) Subject: s4-waf: fixed waf distcheck for our standalone libs and s4 X-Git-Tag: samba-3.6.0pre1~3256 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=7ae4372124a7fde2404f9e626054e7856c18f733 s4-waf: fixed waf distcheck for our standalone libs and s4 --- diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py index 3663bc0bf5b..e01bebe9eda 100644 --- a/buildtools/wafsamba/samba_dist.py +++ b/buildtools/wafsamba/samba_dist.py @@ -18,9 +18,13 @@ def add_tarfile(tar, fname, abspath): 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)) @@ -58,6 +62,7 @@ def dist(): tar.close() print('Created %s' % dist_name) + return dist_name @conf diff --git a/lib/replace/wscript b/lib/replace/wscript index 70475c4f29e..511cbeac30f 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -353,3 +353,7 @@ def build(bld): source='hdr_replace.h', target='stdbool.h', enabled = not bld.CONFIG_SET('HAVE_STDBOOL_H')) + +def dist(): + '''makes a tarball for distribution''' + samba_dist.dist() diff --git a/lib/talloc/wscript b/lib/talloc/wscript index fadb4590ccb..7dc12c5de92 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -66,3 +66,7 @@ def test(ctx): import Utils cmd = os.path.join(Utils.g_module.blddir, 'talloc_testsuite') os.system(cmd) + +def dist(): + '''makes a tarball for distribution''' + samba_dist.dist() diff --git a/lib/tdb/wscript b/lib/tdb/wscript index 90fa191bf83..d80b7209b0f 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -76,3 +76,7 @@ def test(ctx): import Utils cmd = os.path.join(Utils.g_module.blddir, 'tdbtorture') os.system(cmd) + +def dist(): + '''makes a tarball for distribution''' + samba_dist.dist() diff --git a/lib/tevent/wscript b/lib/tevent/wscript index 9f7e25d241e..ee15b956107 100644 --- a/lib/tevent/wscript +++ b/lib/tevent/wscript @@ -58,3 +58,7 @@ def test(ctx): '''test tevent''' print("The tevent testsuite is part of smbtorture in samba4") + +def dist(): + '''makes a tarball for distribution''' + samba_dist.dist() diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript index 971c6688f30..911eb77fb22 100644 --- a/source4/lib/ldb/wscript +++ b/source4/lib/ldb/wscript @@ -15,8 +15,9 @@ sys.path.insert(0, srcdir + '/buildtools/wafsamba') import wafsamba, samba_dist -samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc - lib/tdb:lib/tdb lib/tevent:lib/tevent buildtools:buildtools''') +samba_dist.DIST_DIRS('''source4/lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc + lib/tdb:lib/tdb lib/tevent:lib/tevent lib/popt:lib/popt + buildtools:buildtools''') def set_options(opt): @@ -180,3 +181,7 @@ def test(ctx): import Utils cmd = 'tests/test-tdb.sh' os.system(cmd) + +def dist(): + '''makes a tarball for distribution''' + samba_dist.dist()