Generate version information to version.h
So that only the files that really needs a version are recompiled.
This commit is contained in:
parent
84bfb19554
commit
97817a773e
7 changed files with 10 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -17,6 +17,7 @@ build/
|
||||||
.build/
|
.build/
|
||||||
*.bak
|
*.bak
|
||||||
.vagrant/
|
.vagrant/
|
||||||
|
quantum/version.h
|
||||||
.idea/
|
.idea/
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
.DS_STORE
|
.DS_STORE
|
||||||
|
@ -26,4 +27,4 @@ CMakeLists.txt
|
||||||
.project
|
.project
|
||||||
.settings/
|
.settings/
|
||||||
.idea
|
.idea
|
||||||
.browse.VC.db*
|
.browse.VC.db*
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -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")
|
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")
|
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
|
||||||
OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
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)
|
|
@ -12,6 +12,7 @@
|
||||||
#include "keymap_plover.h"
|
#include "keymap_plover.h"
|
||||||
#include "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
/* Layers */
|
/* Layers */
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "ergodox.h"
|
#include "ergodox.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#define BASE 0 // default layer
|
#define BASE 0 // default layer
|
||||||
#define SYMB 1 // symbols
|
#define SYMB 1 // symbols
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "ergodox.h"
|
#include "ergodox.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#define BASE 0 // default layer
|
#define BASE 0 // default layer
|
||||||
#define SYMB 1 // symbols
|
#define SYMB 1 // symbols
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
/* Each layer is given a name to aid in readability, which is then
|
/* Each layer is given a name to aid in readability, which is then
|
||||||
used in the keymap matrix below. The underscores do not denote
|
used in the keymap matrix below. The underscores do not denote
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue