From b0069c5c05dac2c910d51ef7f3bf4133721a9c49 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sun, 7 Mar 2021 19:10:03 -0800 Subject: Begin the process of deprecating bin/qmk in favor of the global cli (#12109) * Begin the process of deprecating bin/qmk in favor of the global cli * Correctly set the qmk bin --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 91ab9e4e8e..de0a2d4153 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,13 @@ $(info QMK Firmware $(QMK_VERSION)) endif endif +# Determine which qmk cli to use +ifeq (, $(shell which qmk)) + QMK_BIN = bin/qmk +else + QMK_BIN = qmk +endif + # avoid 'Entering|Leaving directory' messages MAKEFLAGS += --no-print-directory @@ -501,8 +508,8 @@ endef %: # Check if we have the CMP tool installed cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; - # Ensure that bin/qmk works. - if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi + # Ensure that $(QMK_BIN) works. + if ! $(QMK_BIN) hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi # Check if the submodules are dirty, and display a warning if they are ifndef SKIP_GIT if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi -- cgit v1.2.3 From f2715a05939b749771d9826f9ad23b4cab280e82 Mon Sep 17 00:00:00 2001 From: Zach White Date: Thu, 18 Mar 2021 16:10:40 -0700 Subject: Consistently use bin/qmk when that script is called (#12286) * Pass QMK_BIN down to build_keyboard.mk * choose the correct qmk script --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index de0a2d4153..80e1a90a19 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ endif endif # Determine which qmk cli to use -ifeq (, $(shell which qmk)) +ifeq (,$(shell which qmk)) QMK_BIN = bin/qmk else QMK_BIN = qmk @@ -391,7 +391,7 @@ define PARSE_KEYMAP # Format it in bold KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR) # Specify the variables that we are passing forward to submake - MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) + MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) QMK_BIN=$$(QMK_BIN) # And the first part of the make command MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET) # The message to display -- cgit v1.2.3 From 64a0f5a659190518a9361e0bd2e8caff0b3354f1 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 6 Apr 2021 16:39:15 +1000 Subject: Add support for producing UF2-format binaries. (#12435) * First stab at enabling builds of UF2-format binaries. * Add description on producing a UF2 file. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 80e1a90a19..e007ae3679 100644 --- a/Makefile +++ b/Makefile @@ -93,8 +93,8 @@ clean: .PHONY: distclean distclean: clean - echo -n 'Deleting *.bin and *.hex ... ' - rm -f *.bin *.hex + echo -n 'Deleting *.bin, *.hex, and *.uf2 ... ' + rm -f *.bin *.hex *.uf2 echo 'done.' #Compatibility with the old make variables, anything you specify directly on the command line -- cgit v1.2.3 From bbe43a91ebf193bbc8c09ba59209b0524367e68c Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 27 Jun 2021 02:29:02 +1000 Subject: CLI: Add subcommand to generate version.h (#13151) --- Makefile | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e007ae3679..866bcaaf3f 100644 --- a/Makefile +++ b/Makefile @@ -548,29 +548,14 @@ git-submodule: git submodule sync --recursive git submodule update --init --recursive --progress -ifdef SKIP_VERSION -SKIP_GIT := yes -endif - # Generate the version.h file -ifndef SKIP_GIT - GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") - CHIBIOS_VERSION := $(shell cd lib/chibios && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") - 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") -else - GIT_VERSION := NA - CHIBIOS_VERSION := NA - CHIBIOS_CONTRIB_VERSION := NA +ifdef SKIP_GIT +VERSION_H_FLAGS := --skip-git endif -ifndef SKIP_VERSION -BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") -else -BUILD_DATE := 2020-01-01-00:00:00 +ifdef SKIP_VERSION +VERSION_H_FLAGS := --skip-all +SKIP_GIT := yes endif - -$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) -$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) -$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h) -$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h) +$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o quantum/version.h) include $(ROOT_DIR)/testlist.mk -- cgit v1.2.3