Parcourir la source

Check for misplaced configs on build (#20599)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
ellensp il y a 3 ans
Parent
révision
b0585e13d8
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11
    0
      buildroot/share/PlatformIO/scripts/common-dependencies.py

+ 11
- 0
buildroot/share/PlatformIO/scripts/common-dependencies.py Voir le fichier

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

Chargement…
Annuler
Enregistrer