From adeca472922700cc63a0d0e1324c5b0cf91be68c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 Jul 2022 21:03:11 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Fix=20Warnings.cpp=20force-recom?= =?UTF-8?q?pile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/scripts/preflight-checks.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/preflight-checks.py b/buildroot/share/PlatformIO/scripts/preflight-checks.py index dbd0510b5d..50b3ed88c7 100644 --- a/buildroot/share/PlatformIO/scripts/preflight-checks.py +++ b/buildroot/share/PlatformIO/scripts/preflight-checks.py @@ -81,10 +81,12 @@ if pioutil.is_pio_build(): # # Give warnings on every build # - srcpath = os.path.join(env['PROJECT_BUILD_DIR'], build_env, "src", "src") - warnfile = os.path.join(srcpath, "inc", "Warnings.cpp.o") - if os.path.exists(warnfile): - os.remove(warnfile) + build_dir = os.path.join(env['PROJECT_BUILD_DIR'], build_env); + for outdir in [ build_dir, os.path.join(build_dir, "debug") ]: + for wext in [ ".cpp", "" ]: + warnfile = os.path.join(outdir, "src", "src", "inc", "Warnings" + wext + ".o") + if os.path.exists(warnfile): + os.remove(warnfile) # # Rebuild 'settings.cpp' for EEPROM_INIT_NOW