diff options
-rw-r--r-- | buildtools/wafsamba/samba_utils.py | 7 | ||||
-rw-r--r-- | lib/wscript_build | 3 |
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) |