Skip to content

Commit f639044

Browse files
authored
Merge pull request #3609 from jbrazio/feature/config-version
Adds versioning for Configuration.h & Configuration_adv.h
2 parents da90bbe + 8ccd97e commit f639044

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+479
-0
lines changed

Marlin/Configuration.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@
3838
#ifndef CONFIGURATION_H
3939
#define CONFIGURATION_H
4040

41+
/**
42+
*
43+
* ***********************************
44+
* ** ATTENTION TO ALL DEVELOPERS **
45+
* ***********************************
46+
*
47+
* You must increment this version number for every significant change such as,
48+
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option.
49+
*
50+
* Note: Update also Version.h !
51+
*/
52+
#define CONFIGURATION_H_VERSION 010100
53+
4154
#include "boards.h"
4255
#include "macros.h"
4356

Marlin/Configuration_adv.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@
3333
#ifndef CONFIGURATION_ADV_H
3434
#define CONFIGURATION_ADV_H
3535

36+
/**
37+
*
38+
* ***********************************
39+
* ** ATTENTION TO ALL DEVELOPERS **
40+
* ***********************************
41+
*
42+
* You must increment this version number for every significant change such as,
43+
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option.
44+
*
45+
* Note: Update also Version.h !
46+
*/
47+
#define CONFIGURATION_ADV_H_VERSION 010100
48+
3649
#include "Conditionals.h"
3750

3851
// @section temperature

Marlin/SanityCheck.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,20 @@
3838
#error "Versions of Arduino IDE prior to 1.6.0 are no longer supported, please update your toolkit."
3939
#endif
4040

41+
/**
42+
* We try our best to include sanity checks for all the changes configuration
43+
* directives because people have a tendency to use outdated config files with
44+
* the bleding edge source code, but sometimes this is not enough. This check
45+
* will force a minimum config file revision, otherwise Marlin will not build.
46+
*/
47+
#if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION
48+
#error You are using an old Configuration.h file, update it before building Marlin.
49+
#endif
50+
51+
#if ! defined(CONFIGURATION_ADV_H_VERSION) || CONFIGURATION_ADV_H_VERSION < REQUIRED_CONFIGURATION_ADV_H_VERSION
52+
#error You are using an old Configuration_adv.h file, update it before building Marlin.
53+
#endif
54+
4155
/**
4256
* Marlin release, version and default string
4357
*/

Marlin/Version.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@
4444
*/
4545
#define STRING_DISTRIBUTION_DATE "2016-04-27 12:00"
4646

47+
/**
48+
* Required minimum Configuration.h and Configuration_adv.h file versions.
49+
*
50+
* You must increment this version number for every significant change such as,
51+
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
52+
* the configuration files.
53+
*/
54+
#define REQUIRED_CONFIGURATION_H_VERSION 010100
55+
#define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100
56+
4757
/**
4858
* @todo: Missing documentation block
4959
*/
Binary file not shown.

Marlin/example_configurations/Felix/Configuration.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@
3838
#ifndef CONFIGURATION_H
3939
#define CONFIGURATION_H
4040

41+
/**
42+
*
43+
* ***********************************
44+
* ** ATTENTION TO ALL DEVELOPERS **
45+
* ***********************************
46+
*
47+
* You must increment this version number for every significant change such as,
48+
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option.
49+
*
50+
* Note: Update also Version.h !
51+
*/
52+
#define CONFIGURATION_H_VERSION 010100
53+
4154
#include "boards.h"
4255
#include "macros.h"
4356

Marlin/example_configurations/Felix/Configuration_adv.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@
3333
#ifndef CONFIGURATION_ADV_H
3434
#define CONFIGURATION_ADV_H
3535

36+
/**
37+
*
38+
* ***********************************
39+
* ** ATTENTION TO ALL DEVELOPERS **
40+
* ***********************************
41+
*
42+
* You must increment this version number for every significant change such as,
43+
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option.
44+
*
45+
* Note: Update also Version.h !
46+
*/
47+
#define CONFIGURATION_ADV_H_VERSION 010100
48+
3649
#include "Conditionals.h"
3750

3851
// @section temperature
Binary file not shown.

Marlin/example_configurations/Felix/DUAL/Configuration.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@
3838
#ifndef CONFIGURATION_H
3939
#define CONFIGURATION_H
4040

41+
/**
42+
*
43+
* ***********************************
44+
* ** ATTENTION TO ALL DEVELOPERS **
45+
* ***********************************
46+
*
47+
* You must increment this version number for every significant change such as,
48+
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option.
49+
*
50+
* Note: Update also Version.h !
51+
*/
52+
#define CONFIGURATION_H_VERSION 010100
53+
4154
#include "boards.h"
4255
#include "macros.h"
4356

Binary file not shown.

0 commit comments

Comments
 (0)