summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-08-10 18:54:14 -0400
committerJack Humbert <jack.humb@gmail.com>2017-08-10 18:54:14 -0400
commit88198a96066c926887f3102ddf43d9f513f25941 (patch)
tree32d56858040ef9c350353ced2805b3920c57566e
parent6895c4510e1e683bf2cfa4a78dbde57a2a8554e4 (diff)
move qmk version to very top, exclude when git isn't available
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6364e0af8b..ebad723bee 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,11 @@ endif
# Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly
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
BREAK_ON_ERRORS = no
@@ -390,7 +395,6 @@ endef
define BUILD
MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR)
COMMANDS += $$(COMMAND)
- MAKE_MSG = QMK Firmware v$$(shell git describe --abbrev=0 --tags 2>/dev/null)\n\n$(MAKE_MSG)
COMMAND_true_$$(COMMAND) := \
printf "$$(MAKE_MSG)" | \
$$(MAKE_MSG_FORMAT); \
@@ -421,7 +425,7 @@ define BUILD_TEST
COMMAND := $1
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET)
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))
ifneq ($$(MAKE_TARGET),clean)
TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf