diff options
author | Scott Lahteine <thinkyhead@users.noreply.github.com> | 2022-07-15 05:03:11 +0300 |
---|---|---|
committer | Scott Lahteine <thinkyhead@users.noreply.github.com> | 2022-07-24 03:57:43 +0300 |
commit | a50bb96d2dd22263c3e55566c789bd717cb7fcdf (patch) | |
tree | 476955ef226992acac02785fe7b011188c64a97c | |
parent | 653f0ab9dd95e07afb2e5f3a5536328f1f3daff1 (diff) |
🔨 Fix Warnings.cpp force-recompile
-rw-r--r-- | buildroot/share/PlatformIO/scripts/preflight-checks.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/buildroot/share/PlatformIO/scripts/preflight-checks.py b/buildroot/share/PlatformIO/scripts/preflight-checks.py index 50b3ed88c7..d0f1c138c9 100644 --- a/buildroot/share/PlatformIO/scripts/preflight-checks.py +++ b/buildroot/share/PlatformIO/scripts/preflight-checks.py @@ -79,22 +79,26 @@ if pioutil.is_pio_build(): raise SystemExit(err) # + # Find the name.cpp.o or name.o and remove it + # + def rm_ofile(subdir, name): + build_dir = os.path.join(env['PROJECT_BUILD_DIR'], build_env); + for outdir in [ build_dir, os.path.join(build_dir, "debug") ]: + for ext in [ ".cpp.o", ".o" ]: + fpath = os.path.join(outdir, "src", "src", subdir, name + ext) + if os.path.exists(fpath): + os.remove(fpath) + + # # Give warnings on every build # - 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) + rm_ofile("inc", "Warnings") # # Rebuild 'settings.cpp' for EEPROM_INIT_NOW # if 'EEPROM_INIT_NOW' in env['MARLIN_FEATURES']: - setfile = os.path.join(srcpath, "module", "settings.cpp.o") - if os.path.exists(setfile): - os.remove(setfile) + rm_ofile("module", "settings") # # Check for old files indicating an entangled Marlin (mixing old and new code) |