From 9263cf1b63b2db137e405869c99d962d07339b68 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Thu, 19 Nov 2015 01:36:47 +0100 Subject: [PATCH 1/3] build:wafsamba: Specify whether node objects or flat lists in ant_glob The changes enable the ant_glob declaration to be compatible with more recent versions of Waf. Signed-off-by: Thomas Nagy --- buildtools/wafsamba/samba_abi.py | 2 +- buildtools/wafsamba/wafsamba.py | 4 ++-- docs-xml/wscript_build | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py index 8220594..196b468 100644 --- a/buildtools/wafsamba/samba_abi.py +++ b/buildtools/wafsamba/samba_abi.py @@ -225,7 +225,7 @@ def abi_build_vscript(task): def ABI_VSCRIPT(bld, libname, abi_directory, version, vscript, abi_match=None): '''generate a vscript file for our public libraries''' if abi_directory: - source = bld.path.ant_glob('%s/%s-[0-9]*.sigs' % (abi_directory, libname)) + source = bld.path.ant_glob('%s/%s-[0-9]*.sigs' % (abi_directory, libname), flat=True) def abi_file_key(path): return version_key(path[:-len(".sigs")].rsplit("-")[-1]) source = sorted(source.split(), key=abi_file_key) diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index a17b609..8af8455 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -727,7 +727,7 @@ def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None): '''used to copy scripts from the source tree into the build directory for use by selftest''' - source = bld.path.ant_glob(pattern) + source = bld.path.ant_glob(pattern, flat=True) bld.SET_BUILD_GROUP('build_source') for s in TO_LIST(source): @@ -856,7 +856,7 @@ def INSTALL_FILES(bld, destdir, files, chmod=MODE_644, flat=False, def INSTALL_WILDCARD(bld, destdir, pattern, chmod=MODE_644, flat=False, python_fixup=False, exclude=None, trim_path=None): '''install a set of files matching a wildcard pattern''' - files=TO_LIST(bld.path.ant_glob(pattern)) + files=TO_LIST(bld.path.ant_glob(pattern, flat=True)) if trim_path: files2 = [] for f in files: diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build index d0e1051..2cff3c1 100644 --- a/docs-xml/wscript_build +++ b/docs-xml/wscript_build @@ -116,7 +116,7 @@ def smbdotconf_generate_parameter_list(task): save_file(parameter_all, t , create_dir=True) return 0 -articles = bld.path.ant_glob("smbdotconf/**/*.xml") +articles = bld.path.ant_glob("smbdotconf/**/*.xml", flat=True) parameter_all = 'smbdotconf/parameters.all.xml' bld.SAMBA_GENERATOR(parameter_all, source=articles, From f3e5c2bd018ecba9dcccb5e364684cde0d7e7384 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Thu, 19 Nov 2015 01:44:43 +0100 Subject: [PATCH 2/3] build:wafsamba: Ensure that target clones get a different name Changing the 'target' attribute results in a different file name, which is visibly necessary. Yet the 'name' attribute should also be modified even if invisible as it is used to query targets (uselib for example). Failing to do so results in errors in Waf 1.8. Signed-off-by: Thomas Nagy --- buildtools/wafsamba/samba_install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py index 8297ce4..21035bf 100644 --- a/buildtools/wafsamba/samba_install.py +++ b/buildtools/wafsamba/samba_install.py @@ -92,6 +92,7 @@ def install_library(self): t = self.clone(self.env) t.posted = False t.target += '.inst' + t.name = self.name + '.inst' self.env.RPATH = build_ldflags else: t = self From aaf5d9c8b7e0a624f232da128fbb7afd147e9dd8 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Thu, 19 Nov 2015 01:55:43 +0100 Subject: [PATCH 3/3] build:wafsamba: Ensure that check_group_ordering can be overridden Group ordering verifications are performed by default in Waf 1.8, so this method will be redundant. The purpose of this change is to make it easier to disable check_group_ordering as it contains code that is very specific to Waf 1.5. Signed-off-by: Thomas Nagy --- buildtools/wafsamba/samba_deps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py index 9e5eab7..3d9712e 100644 --- a/buildtools/wafsamba/samba_deps.py +++ b/buildtools/wafsamba/samba_deps.py @@ -360,7 +360,7 @@ def group_name(g): ret = False return ret - +Build.BuildContext.check_group_ordering = check_group_ordering def show_final_deps(bld, tgt_list): '''show the final dependencies for all targets''' @@ -1159,7 +1159,7 @@ def check_project_rules(bld): debug("deps: check_duplicate_sources: %f" % (time.clock() - tstart)) - if not check_group_ordering(bld, tgt_list): + if not bld.check_group_ordering(tgt_list): Logs.error("Bad group ordering - aborting") sys.exit(1)