summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-03 22:46:32 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:24 +1000
commit7aa3f08f851aef234cb236b11c653f904c9e622a (patch)
tree39d1bda487b96c5c0b20440708a23b0436458d05
parentfeafcd2fb452e6ac92aa2f8d60138cbec9a48083 (diff)
downloadsamba-7aa3f08f851aef234cb236b11c653f904c9e622a.tar.gz
samba-7aa3f08f851aef234cb236b11c653f904c9e622a.tar.bz2
samba-7aa3f08f851aef234cb236b11c653f904c9e622a.zip
build: fixed DESTDIR for TOUCH_FILE()
-rw-r--r--buildtools/wafsamba/samba_utils.py7
-rw-r--r--lib/wscript_build3
2 files changed, 8 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 5637a305d0..07a37aa9e7 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -408,8 +408,13 @@ def IS_NEWER(bld, file1, file2):
Build.BuildContext.IS_NEWER = IS_NEWER
-def TOUCH_FILE(file):
+def TOUCH_FILE(file, install_dir=False):
'''touch a file'''
+ if install_dir:
+ if file[0] == '/':
+ file = Options.options.destdir + file
+ else:
+ file = Options.options.destdir + '/' + file
mkdir_p(os.path.dirname(file))
f = open(file, 'w')
f.close()
diff --git a/lib/wscript_build b/lib/wscript_build
index b8bc9e9120..44bf8108c8 100644
--- a/lib/wscript_build
+++ b/lib/wscript_build
@@ -23,4 +23,5 @@ for e in list:
if Options.is_install:
# we need a blank __init__.py in samba/external
- TOUCH_FILE(bld.EXPAND_VARIABLES('${PYTHONDIR}/samba/external/__init__.py'))
+ TOUCH_FILE(bld.EXPAND_VARIABLES('${PYTHONDIR}/samba/external/__init__.py'),
+ install_dir=True)