diff --git a/HISTORY.rst b/HISTORY.rst index 9e71a5f8..535275c1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,6 +11,8 @@ Release History (`issue #154 `_) * Fixed parsing of includes for PlatformIO Library Dependency Finder (`issue #189 `_) +* Fixed handling symbolic links within source code directory + (`issue #190 `_) * Fixed cancelling any previous definition of name, either built in or provided with a ``-D`` option (`issue #191 `_) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index a3c5aac9..a3566291 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -95,7 +95,7 @@ def VariantDirRecursive(env, variant_dir, src_dir, duplicate=True, ignore_pattern = (".git", ".svn") variants = [] src_dir = env.subst(src_dir) - for root, _, _ in walk(src_dir): + for root, _, _ in walk(src_dir, followlinks=True): _src_dir = root _var_dir = variant_dir + root.replace(src_dir, "") if any([s in _var_dir.lower() for s in ignore_pattern]): @@ -224,7 +224,7 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914 return result def _process_src_dir(state, src_dir): - for root, _, _ in walk(src_dir): + for root, _, _ in walk(src_dir, followlinks=True): for node in (env.GlobCXXFiles(root) + env.Glob(join(root, "*.h"))): state = _parse_includes(state, node)