1
0
Fork 0

move qmk version to very top, exclude when git isn't available

This commit is contained in:
Jack Humbert 2017-08-10 18:54:14 -04:00
parent 6895c4510e
commit 88198a9606

View file

@ -19,6 +19,11 @@ endif
# Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly # Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly
override SILENT := false override SILENT := false
QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null)
ifneq ($(QMK_VERSION),)
$(info QMK Firmware v$(QMK_VERSION))
endif
ON_ERROR := error_occurred=1 ON_ERROR := error_occurred=1
BREAK_ON_ERRORS = no BREAK_ON_ERRORS = no
@ -390,7 +395,6 @@ endef
define BUILD define BUILD
MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR) MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR)
COMMANDS += $$(COMMAND) COMMANDS += $$(COMMAND)
MAKE_MSG = QMK Firmware v$$(shell git describe --abbrev=0 --tags 2>/dev/null)\n\n$(MAKE_MSG)
COMMAND_true_$$(COMMAND) := \ COMMAND_true_$$(COMMAND) := \
printf "$$(MAKE_MSG)" | \ printf "$$(MAKE_MSG)" | \
$$(MAKE_MSG_FORMAT); \ $$(MAKE_MSG_FORMAT); \
@ -421,7 +425,7 @@ define BUILD_TEST
COMMAND := $1 COMMAND := $1
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET) MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET)
MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)" MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)"
MAKE_MSG := QMK Firmware v$$(shell git describe --abbrev=0 --tags 2>/dev/null)\n\n$$(MSG_MAKE_TEST) MAKE_MSG := $$(MSG_MAKE_TEST)
$$(eval $$(call BUILD)) $$(eval $$(call BUILD))
ifneq ($$(MAKE_TARGET),clean) ifneq ($$(MAKE_TARGET),clean)
TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf