diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2016-07-30 22:41:26 +0200 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2016-07-31 12:42:05 +0200 |
commit | 97817a773eb667045144ac820df673ed8d3471a0 (patch) | |
tree | 0f85e274fc0e8906f05f869ee71b95eb2426ea91 | |
parent | 84bfb195545b0ba527f34c386d15d6f732a28de7 (diff) | |
download | qmk_firmware-97817a773eb667045144ac820df673ed8d3471a0.tar.gz qmk_firmware-97817a773eb667045144ac820df673ed8d3471a0.tar.xz |
Generate version information to version.h
So that only the files that really needs a version are recompiled.
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | keyboards/ergodox/keymaps/algernon/keymap.c | 1 | ||||
-rw-r--r-- | keyboards/ergodox/keymaps/default/keymap.c | 1 | ||||
-rw-r--r-- | keyboards/ergodox/keymaps/josh/keymap.c | 1 | ||||
-rw-r--r-- | keyboards/planck/keymaps/cbbrowne/keymap.c | 1 | ||||
-rw-r--r-- | keyboards/planck/keymaps/experimental/keymap.c | 1 |
7 files changed, 10 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index 849143352..8c85d6ffa 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ build/ .build/ *.bak .vagrant/ +quantum/version.h .idea/ CMakeLists.txt .DS_STORE @@ -26,4 +27,4 @@ CMakeLists.txt .project .settings/ .idea -.browse.VC.db*
\ No newline at end of file +.browse.VC.db* @@ -271,4 +271,6 @@ include $(TMK_PATH)/rules.mk GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" -OPT_DEFS += -DQMK_VERSION=\"$(GIT_VERSION)\" -DQMK_BUILDDATE=\"$(BUILD_DATE)\" + +$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(QUANTUM_PATH)/version.h) +$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(QUANTUM_PATH)/version.h)
\ No newline at end of file diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index 6a14ef467..c4de53da2 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -12,6 +12,7 @@ #include "keymap_plover.h"
#include "eeconfig.h"
#include "wait.h"
+#include "version.h" /* Layers */
diff --git a/keyboards/ergodox/keymaps/default/keymap.c b/keyboards/ergodox/keymaps/default/keymap.c index f1a83f4e7..1b80cb3a2 100644 --- a/keyboards/ergodox/keymaps/default/keymap.c +++ b/keyboards/ergodox/keymaps/default/keymap.c @@ -1,6 +1,7 @@ #include "ergodox.h" #include "debug.h" #include "action_layer.h" +#include "version.h" #define BASE 0 // default layer #define SYMB 1 // symbols diff --git a/keyboards/ergodox/keymaps/josh/keymap.c b/keyboards/ergodox/keymaps/josh/keymap.c index 488b21427..b5463873a 100644 --- a/keyboards/ergodox/keymaps/josh/keymap.c +++ b/keyboards/ergodox/keymaps/josh/keymap.c @@ -1,6 +1,7 @@ #include "ergodox.h" #include "debug.h" #include "action_layer.h" +#include "version.h" #define BASE 0 // default layer #define SYMB 1 // symbols diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 14a5be170..70eaefb7b 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -4,6 +4,7 @@ #endif #include "config.h" #include "quantum.h" +#include "version.h" /* Each layer is given a name to aid in readability, which is then used in the keymap matrix below. The underscores do not denote diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index d9303fcae..2c1270094 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c @@ -8,6 +8,7 @@ #endif #include "eeconfig.h" +#include "version.h" extern keymap_config_t keymap_config; |