aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 6 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index e007ae367..866bcaaf3 100644
--- a/Makefile
+++ b/Makefile
@@ -548,29 +548,14 @@ git-submodule:
548 git submodule sync --recursive 548 git submodule sync --recursive
549 git submodule update --init --recursive --progress 549 git submodule update --init --recursive --progress
550 550
551ifdef SKIP_VERSION
552SKIP_GIT := yes
553endif
554
555# Generate the version.h file 551# Generate the version.h file
556ifndef SKIP_GIT 552ifdef SKIP_GIT
557 GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") 553VERSION_H_FLAGS := --skip-git
558 CHIBIOS_VERSION := $(shell cd lib/chibios && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
559 CHIBIOS_CONTRIB_VERSION := $(shell cd lib/chibios-contrib && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
560else
561 GIT_VERSION := NA
562 CHIBIOS_VERSION := NA
563 CHIBIOS_CONTRIB_VERSION := NA
564endif 554endif
565ifndef SKIP_VERSION 555ifdef SKIP_VERSION
566BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") 556VERSION_H_FLAGS := --skip-all
567else 557SKIP_GIT := yes
568BUILD_DATE := 2020-01-01-00:00:00
569endif 558endif
570 559$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o quantum/version.h)
571$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
572$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
573$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
574$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
575 560
576include $(ROOT_DIR)/testlist.mk 561include $(ROOT_DIR)/testlist.mk