|
@@ -84,22 +84,26 @@ if pioutil.is_pio_build():
|
84
|
84
|
raise SystemExit(err)
|
85
|
85
|
|
86
|
86
|
#
|
|
87
|
+ # Find the name.cpp.o or name.o and remove it
|
|
88
|
+ #
|
|
89
|
+ def rm_ofile(subdir, name):
|
|
90
|
+ build_dir = os.path.join(env['PROJECT_BUILD_DIR'], build_env);
|
|
91
|
+ for outdir in [ build_dir, os.path.join(build_dir, "debug") ]:
|
|
92
|
+ for ext in [ ".cpp.o", ".o" ]:
|
|
93
|
+ fpath = os.path.join(outdir, "src", "src", subdir, name + ext)
|
|
94
|
+ if os.path.exists(fpath):
|
|
95
|
+ os.remove(fpath)
|
|
96
|
+
|
|
97
|
+ #
|
87
|
98
|
# Give warnings on every build
|
88
|
99
|
#
|
89
|
|
- build_dir = os.path.join(env['PROJECT_BUILD_DIR'], build_env);
|
90
|
|
- for outdir in [ build_dir, os.path.join(build_dir, "debug") ]:
|
91
|
|
- for wext in [ ".cpp", "" ]:
|
92
|
|
- warnfile = os.path.join(outdir, "src", "src", "inc", "Warnings" + wext + ".o")
|
93
|
|
- if os.path.exists(warnfile):
|
94
|
|
- os.remove(warnfile)
|
|
100
|
+ rm_ofile("inc", "Warnings")
|
95
|
101
|
|
96
|
102
|
#
|
97
|
103
|
# Rebuild 'settings.cpp' for EEPROM_INIT_NOW
|
98
|
104
|
#
|
99
|
105
|
if 'EEPROM_INIT_NOW' in env['MARLIN_FEATURES']:
|
100
|
|
- setfile = os.path.join(srcpath, "module", "settings.cpp.o")
|
101
|
|
- if os.path.exists(setfile):
|
102
|
|
- os.remove(setfile)
|
|
106
|
+ rm_ofile("module", "settings")
|
103
|
107
|
|
104
|
108
|
#
|
105
|
109
|
# Check for old files indicating an entangled Marlin (mixing old and new code)
|