summaryrefslogtreecommitdiffstats
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-02 00:13:26 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:22 +1000
commit4fa9c3187df4c8bfb40d57d2fb3c107b9b20bf47 (patch)
tree725d9ee973204bdd41c4779acd9b4256aa00d79b /buildtools
parentba64e236d59619cb4222225ac98efe2a2c07f592 (diff)
downloadsamba-4fa9c3187df4c8bfb40d57d2fb3c107b9b20bf47.tar.gz
samba-4fa9c3187df4c8bfb40d57d2fb3c107b9b20bf47.tar.xz
samba-4fa9c3187df4c8bfb40d57d2fb3c107b9b20bf47.zip
s4-waf: updates for the new python installer from jelmer
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/wafsamba.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 4658c59aeb6..dc91336c903 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -534,7 +534,7 @@ Build.BuildContext.SAMBA_SCRIPT = SAMBA_SCRIPT
def install_file(bld, destdir, file, chmod=0644, flat=False,
- python_fixup=False, destname=None):
+ python_fixup=False, destname=None, base_name=None):
'''install a file'''
destdir = bld.EXPAND_VARIABLES(destdir)
if not destname:
@@ -550,27 +550,37 @@ def install_file(bld, destdir, file, chmod=0644, flat=False,
source=file,
target=inst_file)
file = inst_file
+ if base_name:
+ file = os.path.join(base_name, file)
bld.install_as(dest, file, chmod=chmod)
def INSTALL_FILES(bld, destdir, files, chmod=0644, flat=False,
- python_fixup=False, destname=None):
+ python_fixup=False, destname=None, base_name=None):
'''install a set of files'''
for f in TO_LIST(files):
install_file(bld, destdir, f, chmod=chmod, flat=flat,
- python_fixup=python_fixup, destname=destname)
+ python_fixup=python_fixup, destname=destname,
+ base_name=base_name)
Build.BuildContext.INSTALL_FILES = INSTALL_FILES
def INSTALL_WILDCARD(bld, destdir, pattern, chmod=0644, flat=False,
- python_fixup=False, exclude=None):
+ 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))
+ if trim_path:
+ files2 = []
+ for f in files:
+ files2.append(os_path_relpath(f, trim_path))
+ files = files2
+
if exclude:
for f in files[:]:
if fnmatch.fnmatch(f, exclude):
files.remove(f)
- INSTALL_FILES(bld, destdir, files, chmod=chmod, flat=flat, python_fixup=python_fixup)
+ INSTALL_FILES(bld, destdir, files, chmod=chmod, flat=flat,
+ python_fixup=python_fixup, base_name=trim_path)
Build.BuildContext.INSTALL_WILDCARD = INSTALL_WILDCARD