diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 502690ada01717a25a3f1ec264429988d96b8f26..1c34d5976fffa72a3c9fa2cdb9e8b24ba1b351fb 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -38,6 +38,19 @@ #ifndef CONFIGURATION_H #define CONFIGURATION_H +/** + * + * *********************************** + * ** ATTENTION TO ALL DEVELOPERS ** + * *********************************** + * + * You must increment this version number for every significant change such as, + * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. + * + * Note: Update also Default_Version.h ! + */ +#define CONFIGURATION_H_VERSION 1 + #include "boards.h" #include "macros.h" diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 952da0fa7e5ffada0d9b8fd70af66c1abd8edf0a..328df8eef4cd8d848776c53afa1f67e3d8ae6b48 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -33,6 +33,19 @@ #ifndef CONFIGURATION_ADV_H #define CONFIGURATION_ADV_H +/** + * + * *********************************** + * ** ATTENTION TO ALL DEVELOPERS ** + * *********************************** + * + * You must increment this version number for every significant change such as, + * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. + * + * Note: Update also Default_Version.h ! + */ +#define CONFIGURATION_ADV_H_VERSION 1 + #include "Conditionals.h" // @section temperature diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index a913cb1b0b31c82bca8dac1832b622d83e3825c7..8d90554e528ecedce670e57148ab6d80fc93b11c 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -38,6 +38,20 @@ #error "Versions of Arduino IDE prior to 1.6.0 are no longer supported, please update your toolkit." #endif +/** + * We try our best to include sanity checks for all the changes configuration + * directives because people have a tendency to use outdated config files with + * the bleding edge source code, but sometimes this is not enough. This check + * will force a minimum config file revision, otherwise Marlin will not build. + */ +#if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION + #error You are using an old Configuration.h file, updated it before building Marlin. +#endif + +#if ! defined(CONFIGURATION_ADV_H_VERSION) || CONFIGURATION_ADV_H_VERSION < REQUIRED_CONFIGURATION_ADV_H_VERSION + #error You are using an old Configuration_adv.h file, updated it before building Marlin. +#endif + /** * Marlin release, version and default string */ diff --git a/Marlin/Version.h b/Marlin/Version.h index 68f3f7604f2df02662ccef7d2905c53497bb9230..edf1a9999cce6720bf8f394a0d2ee6a55112b3b1 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -44,6 +44,16 @@ */ #define STRING_DISTRIBUTION_DATE "2016-04-27 12:00" +/** + * Required minimum Configuration.h and Configuration_adv.h file versions. + * + * You must increment this version number for every significant change such as, + * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on + * the configuration files. + */ +#define REQUIRED_CONFIGURATION_H_VERSION 1 +#define REQUIRED_CONFIGURATION_ADV_H_VERSION 1 + /** * @todo: Missing documentation block */