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 f91d95a12..bb2201e85 100644
--- a/Makefile
+++ b/Makefile
@@ -557,29 +557,14 @@ git-submodule:
557 git submodule sync --recursive 557 git submodule sync --recursive
558 git submodule update --init --recursive --progress 558 git submodule update --init --recursive --progress
559 559
560ifdef SKIP_VERSION
561SKIP_GIT := yes
562endif
563
564# Generate the version.h file 560# Generate the version.h file
565ifndef SKIP_GIT 561ifdef SKIP_GIT
566 GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") 562VERSION_H_FLAGS := --skip-git
567 CHIBIOS_VERSION := $(shell cd lib/chibios && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
568 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")
569else
570 GIT_VERSION := NA
571 CHIBIOS_VERSION := NA
572 CHIBIOS_CONTRIB_VERSION := NA
573endif 563endif
574ifndef SKIP_VERSION 564ifdef SKIP_VERSION
575BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") 565VERSION_H_FLAGS := --skip-all
576else 566SKIP_GIT := yes
577BUILD_DATE := 2020-01-01-00:00:00
578endif 567endif
579 568$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o quantum/version.h)
580$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
581$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
582$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
583$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
584 569
585include $(ROOT_DIR)/testlist.mk 570include $(ROOT_DIR)/testlist.mk