From 329acc852e50b30f9f3a9f00669fad47ae90b0f5 Mon Sep 17 00:00:00 2001
From: Richard Wackerbarth <rkw@dataplex.net>
Date: Sat, 1 Aug 2015 09:57:59 -0500
Subject: [PATCH] Canonize Option flag USE_AUTOMATIC_VERSION

---
 .../Arduino_1.6.x/hardware/marlin/avr/platform.local.txt      | 2 +-
 Marlin/Configuration.h                                        | 2 +-
 Marlin/SanityCheck.h                                          | 4 ++++
 Marlin/configurator/config/Configuration.h                    | 2 +-
 Marlin/configurator/config/language.h                         | 2 +-
 Marlin/example_configurations/Felix/Configuration.h           | 2 +-
 Marlin/example_configurations/Felix/Configuration_DUAL.h      | 2 +-
 Marlin/example_configurations/Hephestos/Configuration.h       | 2 +-
 Marlin/example_configurations/K8200/Configuration.h           | 2 +-
 .../RepRapWorld/Megatronics/Configuration.h                   | 2 +-
 Marlin/example_configurations/RigidBot/Configuration.h        | 2 +-
 Marlin/example_configurations/SCARA/Configuration.h           | 2 +-
 Marlin/example_configurations/WITBOX/Configuration.h          | 2 +-
 Marlin/example_configurations/adafruit/ST7565/Configuration.h | 2 +-
 Marlin/example_configurations/delta/biv2.5/Configuration.h    | 2 +-
 Marlin/example_configurations/delta/generic/Configuration.h   | 2 +-
 .../example_configurations/delta/kossel_mini/Configuration.h  | 2 +-
 .../example_configurations/delta/kossel_pro/Configuration.h   | 2 +-
 Marlin/example_configurations/makibox/Configuration.h         | 2 +-
 Marlin/example_configurations/tvrrug/Round2/Configuration.h   | 2 +-
 Marlin/language.h                                             | 2 +-
 21 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/ArduinoAddons/Arduino_1.6.x/hardware/marlin/avr/platform.local.txt b/ArduinoAddons/Arduino_1.6.x/hardware/marlin/avr/platform.local.txt
index 61094db8ed0..b4960613789 100644
--- a/ArduinoAddons/Arduino_1.6.x/hardware/marlin/avr/platform.local.txt
+++ b/ArduinoAddons/Arduino_1.6.x/hardware/marlin/avr/platform.local.txt
@@ -1,4 +1,4 @@
-compiler.cpp.extra_flags=-DHAS_AUTOMATIC_VERSIONING
+compiler.cpp.extra_flags=-DUSE_AUTOMATIC_VERSIONING
 build.custom_bin.path.macosx=/usr/local/bin/
 build.custom_bin.path.linux=
 recipe.hooks.prebuild0.pattern={build.custom_bin.path}generate_version_header_for_marlin "{build.source.path}" "{build.path}/_Version.h"
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 71679be0412..b6e12ee595a 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h
index d225bc4c271..14368839a48 100644
--- a/Marlin/SanityCheck.h
+++ b/Marlin/SanityCheck.h
@@ -382,4 +382,8 @@
     #error CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME instead
   #endif
 
+  #ifdef HAS_AUTOMATIC_VERSIONING
+    #error HAS_AUTOMATIC_VERSIONING deprecated - use USE_AUTOMATIC_VERSIONING instead
+  #endif
+
 #endif //SANITYCHECK_H
diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h
index 71679be0412..b6e12ee595a 100644
--- a/Marlin/configurator/config/Configuration.h
+++ b/Marlin/configurator/config/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/configurator/config/language.h b/Marlin/configurator/config/language.h
index b421dd946f1..9d64482c117 100644
--- a/Marlin/configurator/config/language.h
+++ b/Marlin/configurator/config/language.h
@@ -38,7 +38,7 @@
   #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
 #endif
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #endif
 
diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h
index d54687c970c..1d6b8d6fa5d 100644
--- a/Marlin/example_configurations/Felix/Configuration.h
+++ b/Marlin/example_configurations/Felix/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h
index 1b57f282175..289a2a41ffe 100644
--- a/Marlin/example_configurations/Felix/Configuration_DUAL.h
+++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h
index 7d1487bdc11..e988fc73213 100644
--- a/Marlin/example_configurations/Hephestos/Configuration.h
+++ b/Marlin/example_configurations/Hephestos/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h
index 123620ca2dd..3755b6e8cb9 100644
--- a/Marlin/example_configurations/K8200/Configuration.h
+++ b/Marlin/example_configurations/K8200/Configuration.h
@@ -43,7 +43,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
index adb460ff399..dec00d78de7 100644
--- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
+++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h
index f48ade2ba62..e7f5d6a0524 100644
--- a/Marlin/example_configurations/RigidBot/Configuration.h
+++ b/Marlin/example_configurations/RigidBot/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h
index 957405b467f..785beb70328 100644
--- a/Marlin/example_configurations/SCARA/Configuration.h
+++ b/Marlin/example_configurations/SCARA/Configuration.h
@@ -63,7 +63,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h
index 4523ef9504d..1777a553b70 100644
--- a/Marlin/example_configurations/WITBOX/Configuration.h
+++ b/Marlin/example_configurations/WITBOX/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h
index 179b9f2dece..975c6cae965 100644
--- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h
+++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h
index cca54a993f1..23c704842ce 100644
--- a/Marlin/example_configurations/delta/biv2.5/Configuration.h
+++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h
index 521cfcae11c..8a0448e9d8d 100644
--- a/Marlin/example_configurations/delta/generic/Configuration.h
+++ b/Marlin/example_configurations/delta/generic/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h
index 07bedbbb1e0..3c34e231a6a 100644
--- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h
+++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h
index 3f88166caf1..e62cfbc5ab3 100644
--- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h
+++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h
@@ -42,7 +42,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h
index 7ac1105f908..1b464d6311b 100644
--- a/Marlin/example_configurations/makibox/Configuration.h
+++ b/Marlin/example_configurations/makibox/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h
index 8aba4684345..d2acfc0eb58 100644
--- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h
+++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h
@@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
 
 // @section info
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #else
   #include "Default_Version.h"
diff --git a/Marlin/language.h b/Marlin/language.h
index b421dd946f1..9d64482c117 100644
--- a/Marlin/language.h
+++ b/Marlin/language.h
@@ -38,7 +38,7 @@
   #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
 #endif
 
-#if ENABLED(HAS_AUTOMATIC_VERSIONING)
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
   #include "_Version.h"
 #endif