From f4cc0897ecbb63c0eba6b235954c1e0e4316971d Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 17 Oct 2009 18:41:55 +0000 Subject: [PATCH] Some enhancements to the dependency-build system. Recompilation time is now greatly reduced as binaries and libraries are not relinked anymore if just it's dependency dll's have changed. --- makepanda/makepandacore.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 3cdb51624e..2f80155247 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -1672,11 +1672,14 @@ def TargetAdd(target, dummy=0, opts=0, input=0, dep=0, ipath=0): for x in input: fullinput = FindLocation(x, ipath) t.inputs.append(fullinput) - t.deps[fullinput] = 1 - (base,suffix) = os.path.splitext(x) - if (SUFFIX_INC.count(suffix)): - for d in CxxCalcDependencies(fullinput, ipath, []): - t.deps[d] = 1 + # Don't re-link a library or binary if just it's dependency dll's have been altered. + # This should work out fine in most cases, and often reduces recompilation time. + if (os.path.splitext(x)[-1] not in SUFFIX_DLL): + t.deps[fullinput] = 1 + (base,suffix) = os.path.splitext(x) + if (SUFFIX_INC.count(suffix)): + for d in CxxCalcDependencies(fullinput, ipath, []): + t.deps[d] = 1 if (dep != 0): for x in dep: fulldep = FindLocation(x, ipath)