From 850db61b761ebb8a4496bb031922f091b6df563e Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Mon, 16 Nov 2020 10:52:28 +0300 Subject: [PATCH] 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 --- code/scripts/pio_pre.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/scripts/pio_pre.py b/code/scripts/pio_pre.py index 495f67e0..ded05876 100644 --- a/code/scripts/pio_pre.py +++ b/code/scripts/pio_pre.py @@ -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")