wafsamba: Make INSTALL_DIR() respect $DESTDIR
authorMartin Schwenke <martin@meltin.net>
Mon, 10 Sep 2018 00:35:24 +0000 (10:35 +1000)
committerAlexander Bokovoy <ab@samba.org>
Tue, 11 Sep 2018 04:59:11 +0000 (06:59 +0200)
INSTALL_DIR() currently ignores $DESTDIR and just installs directories
into the final destination.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
buildtools/wafsamba/wafsamba.py

index d6754e9127ced2633bdb68ef1057346c8ef267f7..93ca7ace43a8eff7b7983e1c15317497c202ac1a 100644 (file)
@@ -897,7 +897,8 @@ def INSTALL_DIR(bld, path, chmod=0o755, env=None):
     if not path:
         return []
 
-    destpath = bld.EXPAND_VARIABLES(path)
+    destpath = os.path.join(Options.options.destdir,
+                            bld.EXPAND_VARIABLES(path).lstrip(os.sep))
 
     if bld.is_install > 0:
         if not os.path.isdir(destpath):