pio: filter single-source files by absolute path

Specifically, this will break RFM69_SUPPORT on case insensitive
filesystems due to the RFM69.cpp from the RFM69 lib being ignored
when adding ESPurna's rfm69.cpp
This commit is contained in:
Maxim Prokhorov
2020-11-16 10:52:28 +03:00
parent 12ae9d15be
commit 850db61b76

View File

@@ -156,7 +156,10 @@ if "1" == os.environ.get("ESPURNA_BUILD_SINGLE_SOURCE", "0"):
for name in filenames:
if not name.endswith(".cpp"):
continue
path = os.path.relpath(os.path.join(root, name), "espurna")
env.AddBuildMiddleware(lambda node: None, "*?/{}".format(path))
cpp_files.append(path)
abspath = os.path.join(os.path.abspath(root), name)
env.AddBuildMiddleware(lambda node: None, abspath)
relpath = os.path.relpath(abspath, "espurna")
cpp_files.append(relpath)
merge_cpp(cpp_files, "espurna/espurna_single_source.cpp")