Bladeren bron

Check for misplaced configs on build (#20599)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
ellensp 4 jaren geleden
bovenliggende
commit
b0585e13d8
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 11 en 0 verwijderingen
  1. 11
    0
      buildroot/share/PlatformIO/scripts/common-dependencies.py

+ 11
- 0
buildroot/share/PlatformIO/scripts/common-dependencies.py Bestand weergeven

301
 	return some_on
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
 # Add a method for other PIO scripts to query enabled features
314
 # Add a method for other PIO scripts to query enabled features
305
 #
315
 #
306
 env.AddMethod(MarlinFeatureIsEnabled)
316
 env.AddMethod(MarlinFeatureIsEnabled)
308
 #
318
 #
309
 # Add dependencies for enabled Marlin features
319
 # Add dependencies for enabled Marlin features
310
 #
320
 #
321
+check_configfile_locations() 
311
 apply_features_config()
322
 apply_features_config()
312
 force_ignore_unused_libs()
323
 force_ignore_unused_libs()

Laden…
Annuleren
Opslaan