Check for misplaced configs on build (#20599)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
e685950d97
commit
b0585e13d8
|
@ -300,6 +300,16 @@ def MarlinFeatureIsEnabled(env, feature):
|
||||||
|
|
||||||
return some_on
|
return some_on
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for Configfiles in two common incorrect places
|
||||||
|
#
|
||||||
|
def check_configfile_locations():
|
||||||
|
for p in [ env['PROJECT_DIR'], os.path.join(env['PROJECT_DIR'], "config") ]:
|
||||||
|
for f in [ "Configuration.h", "Configuration_adv.h" ]:
|
||||||
|
if os.path.isfile(os.path.join(p, f)):
|
||||||
|
err = 'ERROR: Config files found in directory ' + str(p) + '. Please move them into the Marlin subdirectory.'
|
||||||
|
raise SystemExit(err)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add a method for other PIO scripts to query enabled features
|
# Add a method for other PIO scripts to query enabled features
|
||||||
#
|
#
|
||||||
|
@ -308,5 +318,6 @@ env.AddMethod(MarlinFeatureIsEnabled)
|
||||||
#
|
#
|
||||||
# Add dependencies for enabled Marlin features
|
# Add dependencies for enabled Marlin features
|
||||||
#
|
#
|
||||||
|
check_configfile_locations()
|
||||||
apply_features_config()
|
apply_features_config()
|
||||||
force_ignore_unused_libs()
|
force_ignore_unused_libs()
|
||||||
|
|
Loading…
Reference in a new issue