summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-19 10:49:08 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:53 +1000
commit2a1520ba67c27963e494012c02b73e0a14579347 (patch)
tree494b2bf92a76a316e37ff9f19807ecf509f12ea8 /buildtools
parent651941abbaafc29bff68d37f2ff343cf05982008 (diff)
downloadsamba-2a1520ba67c27963e494012c02b73e0a14579347.tar.gz
samba-2a1520ba67c27963e494012c02b73e0a14579347.tar.bz2
samba-2a1520ba67c27963e494012c02b73e0a14579347.zip
build: make bin/sambadeps depend on samba_deps.py modtime
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_deps.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index a3910b0d28..b737e65e86 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -596,11 +596,12 @@ def calculate_final_deps(bld, tgt_list):
######################################################################
# this provides a way to save our dependency calculations between runs
-savedeps_version = 2
+savedeps_version = 3
savedeps_inputs = ['samba_deps', 'samba_includes', 'local_include', 'local_include_first', 'samba_cflags']
savedeps_outputs = ['uselib', 'uselib_local', 'add_objects', 'includes', 'ccflags']
savedeps_outenv = ['INC_PATHS']
savedeps_caches = ['GLOBAL_DEPENDENCIES', 'TARGET_ALIAS', 'TARGET_TYPE', 'INIT_FUNCTIONS']
+savedeps_files = ['buildtools/wafsamba/samba_deps.py']
def save_samba_deps(bld, tgt_list):
'''save the dependency calculations between builds, to make
@@ -614,6 +615,10 @@ def save_samba_deps(bld, tgt_list):
denv.output = {}
denv.outenv = {}
denv.caches = {}
+ denv.files = {}
+
+ for f in savedeps_files:
+ denv.files[f] = os.stat(os.path.join(bld.srcnode.abspath(), f)).st_mtime
for c in savedeps_caches:
denv.caches[c] = LOCAL_CACHE(bld, c)
@@ -662,6 +667,13 @@ def load_samba_deps(bld, tgt_list):
except:
return False
+ # check if critical files have changed
+ for f in savedeps_files:
+ if f not in denv.files:
+ return False
+ if denv.files[f] != os.stat(os.path.join(bld.srcnode.abspath(), f)).st_mtime:
+ return False
+
# check if caches are the same
for c in savedeps_caches:
if c not in denv.caches or denv.caches[c] != LOCAL_CACHE(bld, c):