diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 6 insertions, 21 deletions
@@ -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 | ||
560 | ifdef SKIP_VERSION | ||
561 | SKIP_GIT := yes | ||
562 | endif | ||
563 | |||
564 | # Generate the version.h file | 560 | # Generate the version.h file |
565 | ifndef SKIP_GIT | 561 | ifdef SKIP_GIT |
566 | GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") | 562 | VERSION_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") | ||
569 | else | ||
570 | GIT_VERSION := NA | ||
571 | CHIBIOS_VERSION := NA | ||
572 | CHIBIOS_CONTRIB_VERSION := NA | ||
573 | endif | 563 | endif |
574 | ifndef SKIP_VERSION | 564 | ifdef SKIP_VERSION |
575 | BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") | 565 | VERSION_H_FLAGS := --skip-all |
576 | else | 566 | SKIP_GIT := yes |
577 | BUILD_DATE := 2020-01-01-00:00:00 | ||
578 | endif | 567 | endif |
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 | ||
585 | include $(ROOT_DIR)/testlist.mk | 570 | include $(ROOT_DIR)/testlist.mk |