You can also use the Glob function to find all files matching a
certain template, using the standard shell pattern matching
characters *, ?
and [abc] to match any of
a, b or c.
[!abc] is also supported,
to match any character except
a, b or c.
This makes many multi-source-file builds quite easy:
Program('program', Glob('*.c'))
|
The SCons man page has more details on using Glob
with variant directories
(see the Chapter called Variant Builds, below)
and repositories
(see the Chapter called Building From Code Repositories, below),
and returning strings rather than Nodes.