Przeglądaj źródła

Added a versioning system to the config files

João Brázio 8 lat temu
rodzic
commit
de8108648f
No account linked to committer's email address
4 zmienionych plików z 50 dodań i 0 usunięć
  1. 13
    0
      Marlin/Configuration.h
  2. 13
    0
      Marlin/Configuration_adv.h
  3. 14
    0
      Marlin/SanityCheck.h
  4. 10
    0
      Marlin/Version.h

+ 13
- 0
Marlin/Configuration.h Wyświetl plik

@@ -38,6 +38,19 @@
38 38
 #ifndef CONFIGURATION_H
39 39
 #define CONFIGURATION_H
40 40
 
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 Default_Version.h !
51
+ */
52
+#define CONFIGURATION_H_VERSION 1
53
+
41 54
 #include "boards.h"
42 55
 #include "macros.h"
43 56
 

+ 13
- 0
Marlin/Configuration_adv.h Wyświetl plik

@@ -33,6 +33,19 @@
33 33
 #ifndef CONFIGURATION_ADV_H
34 34
 #define CONFIGURATION_ADV_H
35 35
 
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 Default_Version.h !
46
+ */
47
+#define CONFIGURATION_ADV_H_VERSION 1
48
+
36 49
 #include "Conditionals.h"
37 50
 
38 51
 // @section temperature

+ 14
- 0
Marlin/SanityCheck.h Wyświetl plik

@@ -39,6 +39,20 @@
39 39
 #endif
40 40
 
41 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, updated 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, updated it before building Marlin.
53
+#endif
54
+
55
+/**
42 56
  * Marlin release, version and default string
43 57
  */
44 58
 #ifndef SHORT_BUILD_VERSION

+ 10
- 0
Marlin/Version.h Wyświetl plik

@@ -45,6 +45,16 @@
45 45
 #define STRING_DISTRIBUTION_DATE "2016-04-27 12:00"
46 46
 
47 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 1
55
+#define REQUIRED_CONFIGURATION_ADV_H_VERSION 1
56
+
57
+/**
48 58
  * @todo: Missing documentation block
49 59
  */
50 60
 #define PROTOCOL_VERSION "1.0"

Ładowanie…
Anuluj
Zapisz