mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Deleted stale check. Now SCons supports globbing with # inside path
Some parts of the buildsystem already were using it with `#` in path Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
This commit is contained in:
parent
c6c464cf9a
commit
81a032337c
2 changed files with 15 additions and 23 deletions
22
methods.py
22
methods.py
|
|
@ -73,21 +73,13 @@ def print_error(*values: object) -> None:
|
|||
|
||||
def add_source_files_orig(self, sources, files, allow_gen=False):
|
||||
# Convert string to list of absolute paths (including expanding wildcard)
|
||||
if isinstance(files, (str, bytes)):
|
||||
# Keep SCons project-absolute path as they are (no wildcard support)
|
||||
if files.startswith("#"):
|
||||
if "*" in files:
|
||||
print_error("Wildcards can't be expanded in SCons project-absolute path: '{}'".format(files))
|
||||
return
|
||||
files = [files]
|
||||
else:
|
||||
# Exclude .gen.cpp files from globbing, to avoid including obsolete ones.
|
||||
# They should instead be added manually.
|
||||
skip_gen_cpp = "*" in files
|
||||
dir_path = self.Dir(".").abspath
|
||||
files = sorted(glob.glob(dir_path + "/" + files))
|
||||
if skip_gen_cpp and not allow_gen:
|
||||
files = [f for f in files if not f.endswith(".gen.cpp")]
|
||||
if isinstance(files, str):
|
||||
# Exclude .gen.cpp files from globbing, to avoid including obsolete ones.
|
||||
# They should instead be added manually.
|
||||
skip_gen_cpp = "*" in files
|
||||
files = self.Glob(files)
|
||||
if skip_gen_cpp and not allow_gen:
|
||||
files = [f for f in files if not str(f).endswith(".gen.cpp")]
|
||||
|
||||
# Add each path as compiled Object following environment (self) configuration
|
||||
for path in files:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue