1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 05:06:30 +04:00

[FL-2052] New build system based on scons (#1269)

This commit is contained in:
hedger
2022-06-26 15:00:03 +03:00
committed by GitHub
parent c79fb61909
commit f3b1475ede
179 changed files with 3986 additions and 5196 deletions

View File

@@ -0,0 +1,25 @@
import SCons
def GlobRecursive(env, pattern, node=".", exclude=None):
results = []
if isinstance(node, str):
node = env.Dir(node)
for f in node.glob("*", source=True, exclude=exclude):
if isinstance(f, SCons.Node.FS.Dir):
results += env.GlobRecursive(pattern, f, exclude)
results += node.glob(
pattern,
source=True,
exclude=exclude,
)
# print(f"Glob for {pattern} from {node}: {results}")
return results
def generate(env):
env.AddMethod(GlobRecursive)
def exists(env):
return True