Hi,
Node.FS.Base.Rfindalldirs is used for include flag generation and lookup of
directories from *PATH vars. It might occur duplicate paths of various
reasons (eg. after variable substitution) in the return value from
Rfindalldirs. Wouldn't it be neat to uniqify that list to avoid duplicate
include flags for example?
diff --git a/scons-local-2.3.4/SCons/Node/FS.py
b/scons-local-2.3.4/SCons/Node/FS.py
index 4b95613..41dd8c7 100644
--- a/scons-local-2.3.4/SCons/Node/FS.py
+++ b/scons-local-2.3.4/SCons/Node/FS.py
@@ -847,9 +847,15 @@ class Base(SCons.Node.Node):
dir = create_dir_relative_to_self(path)
result.extend(dir.get_all_rdirs())
- memo_dict[pathlist] = result
-
- return result
+ seen = set()
+ uniqresult = []
+ for r in result:
+ if r.path not in seen:
+ uniqresult.append(r)
+ seen.add(r.path)
+ memo_dict[pathlist] = uniqresult
+
+ return uniqresult
def RDirs(self, pathlist):
"""Search for a list of directories in the Repository list."""
--
Simon Tegelid
_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev