buildtools/wafsamba: use CACHE_SUFFIX instead of a hard-coded name
authorAlexander Bokovoy <ab@samba.org>
Mon, 3 Sep 2018 10:04:58 +0000 (13:04 +0300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Sep 2018 04:37:27 +0000 (06:37 +0200)
waflib.Build provides CACHE_SUFFIX constant to append to the target
name. We have a reference to samba-specific cache suffix (.cache.py)
while original WAF uses _cache.py as a cache suffix since 2011 (see
commit 44a967e326cc2e670a31b3712e4763b72d65e81b in WAF project code).

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_utils.py

index 38756cc74f96b812e147cd53405c0420ec18eee8..30e99432d1b3e64fb9b4c43864084e7203dec81b 100644 (file)
@@ -8,6 +8,7 @@ from waflib.TaskGen import feature, before, after
 from waflib.Configure import ConfigurationContext
 from waflib.Logs import debug
 from waflib import ConfigSet
+from waflib.Build import CACHE_SUFFIX
 
 # TODO: make this a --option
 LIB_PATH="shared"
@@ -393,7 +394,7 @@ def LOAD_ENVIRONMENT():
        from new commands'''
     env = ConfigSet.ConfigSet()
     try:
-        p = os.path.join(Context.g_module.out, 'c4che/default_cache.py')
+        p = os.path.join(Context.g_module.out, 'c4che/default'+CACHE_SUFFIX)
         env.load(p)
     except (OSError, IOError):
         pass