summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-07-30 22:41:26 +0200
committerFred Sundvik <fsundvik@gmail.com>2016-07-31 12:42:05 +0200
commit97817a773eb667045144ac820df673ed8d3471a0 (patch)
tree0f85e274fc0e8906f05f869ee71b95eb2426ea91 /Makefile
parent84bfb195545b0ba527f34c386d15d6f732a28de7 (diff)
downloadqmk_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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 60c7a6ef6..053c8532a 100644
--- a/Makefile
+++ b/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")
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