Browse Source

Check for misplaced configs on build (#20599)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
ellensp 3 years ago
parent
commit
b0585e13d8
No account linked to committer's email address
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      buildroot/share/PlatformIO/scripts/common-dependencies.py

+ 11
- 0
buildroot/share/PlatformIO/scripts/common-dependencies.py View File

@@ -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()

Loading…
Cancel
Save