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