Skip to content

Commit

Permalink
Typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Mar 27, 2024
1 parent 02d004d commit b901f2d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions builder/frameworks/espidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def compile_source_files(
):
build_envs = prepare_build_envs(config, default_env, debug_allowed)
objects = []
components_dir = fs.to_unix_path(os.path.join(FRAMEWORK_DIR, "components")).lower()
components_dir = fs.to_unix_path(os.path.join(FRAMEWORK_DIR, "components"))
for source in config.get("sources", []):
if source["path"].endswith(".rule"):
continue
Expand All @@ -674,16 +674,13 @@ def compile_source_files(
src_dir = config["paths"]["source"]
if not os.path.isabs(src_dir):
src_dir = os.path.join(project_src_dir, config["paths"]["source"])
src_path = os.path.join(
os.path.dirname(source.get("path")).lower(),
os.path.basename(source.get("path"))
)
src_path = source.get("path")
if not os.path.isabs(src_path):
# For cases when sources are located near CMakeLists.txt
src_path = os.path.join(project_src_dir, src_path)

obj_path = os.path.join("$BUILD_DIR", prepend_dir or "")
if src_path.startswith(components_dir):
if src_path.lower().startswith(components_dir.lower()):
obj_path = os.path.join(
obj_path, os.path.relpath(src_path, components_dir)
)
Expand Down

0 comments on commit b901f2d

Please sign in to comment.