|
@@ -301,6 +301,16 @@ def MarlinFeatureIsEnabled(env, feature):
|
301
|
301
|
return some_on
|
302
|
302
|
|
303
|
303
|
#
|
|
304
|
+# Check for Configfiles in two common incorrect places
|
|
305
|
+#
|
|
306
|
+def check_configfile_locations():
|
|
307
|
+ for p in [ env['PROJECT_DIR'], os.path.join(env['PROJECT_DIR'], "config") ]:
|
|
308
|
+ for f in [ "Configuration.h", "Configuration_adv.h" ]:
|
|
309
|
+ if os.path.isfile(os.path.join(p, f)):
|
|
310
|
+ err = 'ERROR: Config files found in directory ' + str(p) + '. Please move them into the Marlin subdirectory.'
|
|
311
|
+ raise SystemExit(err)
|
|
312
|
+
|
|
313
|
+#
|
304
|
314
|
# Add a method for other PIO scripts to query enabled features
|
305
|
315
|
#
|
306
|
316
|
env.AddMethod(MarlinFeatureIsEnabled)
|
|
@@ -308,5 +318,6 @@ env.AddMethod(MarlinFeatureIsEnabled)
|
308
|
318
|
#
|
309
|
319
|
# Add dependencies for enabled Marlin features
|
310
|
320
|
#
|
|
321
|
+check_configfile_locations()
|
311
|
322
|
apply_features_config()
|
312
|
323
|
force_ignore_unused_libs()
|