summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--builddefs/build_full_test.mk (renamed from build_full_test.mk)0
-rw-r--r--builddefs/build_json.mk (renamed from build_json.mk)0
-rw-r--r--builddefs/build_keyboard.mk (renamed from build_keyboard.mk)8
-rw-r--r--builddefs/build_layout.mk (renamed from build_layout.mk)0
-rw-r--r--builddefs/build_test.mk (renamed from build_test.mk)6
-rw-r--r--builddefs/common_features.mk (renamed from common_features.mk)0
-rw-r--r--builddefs/common_rules.mk (renamed from tmk_core/rules.mk)0
-rw-r--r--builddefs/testlist.mk (renamed from testlist.mk)0
-rwxr-xr-xlib/python/qmk/cli/multibuild.py2
-rw-r--r--lib/python/qmk/commands.py2
-rw-r--r--paths.mk4
12 files changed, 15 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 22c79880a3..4c2e6a04dc 100644
--- a/Makefile
+++ b/Makefile
@@ -275,7 +275,7 @@ define PARSE_KEYMAP
# Specify the variables that we are passing forward to submake
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)
+ MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f $(BUILDDEFS_PATH)/build_keyboard.mk $$(MAKE_TARGET)
# The message to display
MAKE_MSG := $$(MSG_MAKE_KB)
# We run the command differently, depending on if we want more output or not
@@ -317,7 +317,7 @@ define BUILD_TEST
TEST_NAME := $$(notdir $$(TEST_PATH))
MAKE_TARGET := $2
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 $(BUILDDEFS_PATH)/build_test.mk $$(MAKE_TARGET)
MAKE_VARS := TEST=$$(TEST_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)"
MAKE_MSG := $$(MSG_MAKE_TEST)
$$(eval $$(call BUILD))
@@ -339,7 +339,7 @@ define PARSE_TEST
TESTS :=
TEST_NAME := $$(firstword $$(subst :, ,$$(RULE)))
TEST_TARGET := $$(subst $$(TEST_NAME),,$$(subst $$(TEST_NAME):,,$$(RULE)))
- include $(ROOT_DIR)/testlist.mk
+ include $(BUILDDEFS_PATH)/testlist.mk
ifeq ($$(TEST_NAME),all)
MATCHED_TESTS := $$(TEST_LIST)
else
diff --git a/build_full_test.mk b/builddefs/build_full_test.mk
index 4e4b4e4bfd..4e4b4e4bfd 100644
--- a/build_full_test.mk
+++ b/builddefs/build_full_test.mk
diff --git a/build_json.mk b/builddefs/build_json.mk
index 0c034eb2ae..0c034eb2ae 100644
--- a/build_json.mk
+++ b/builddefs/build_json.mk
diff --git a/build_keyboard.mk b/builddefs/build_keyboard.mk
index f727760465..d5efcb4193 100644
--- a/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -111,7 +111,7 @@ INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard
include $(INFO_RULES_MK)
# Check for keymap.json first, so we can regenerate keymap.c
-include build_json.mk
+include $(BUILDDEFS_PATH)/build_json.mk
# Pull in keymap level rules.mk
ifeq ("$(wildcard $(KEYMAP_PATH))", "")
@@ -138,7 +138,7 @@ ifeq ("$(wildcard $(KEYMAP_PATH))", "")
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
else ifneq ($(LAYOUTS),)
# If we haven't found a keymap yet fall back to community layouts
- include build_layout.mk
+ include $(BUILDDEFS_PATH)/build_layout.mk
else
$(call CATASTROPHIC_ERROR,Invalid keymap,Could not find keymap)
# this state should never be reached
@@ -398,7 +398,7 @@ VPATH += $(COMMON_VPATH)
VPATH += $(KEYBOARD_OUTPUT)/src
VPATH += $(KEYMAP_OUTPUT)/src
-include common_features.mk
+include $(BUILDDEFS_PATH)/common_features.mk
include $(BUILDDEFS_PATH)/generic_features.mk
include $(TMK_PATH)/protocol.mk
include $(PLATFORM_PATH)/common.mk
@@ -460,7 +460,7 @@ check-md5: build
objs-size: build
include $(BUILDDEFS_PATH)/show_options.mk
-include $(TMK_PATH)/rules.mk
+include $(BUILDDEFS_PATH)/common_rules.mk
# Ensure we have generated files available for each of the objects
define GEN_FILES
diff --git a/build_layout.mk b/builddefs/build_layout.mk
index 6166bd847c..6166bd847c 100644
--- a/build_layout.mk
+++ b/builddefs/build_layout.mk
diff --git a/build_test.mk b/builddefs/build_test.mk
index ec6699b4ea..7226004aab 100644
--- a/build_test.mk
+++ b/builddefs/build_test.mk
@@ -54,7 +54,7 @@ include tests/test_common/build.mk
include $(TEST_PATH)/test.mk
endif
-include common_features.mk
+include $(BUILDDEFS_PATH)/common_features.mk
include $(BUILDDEFS_PATH)/generic_features.mk
include $(PLATFORM_PATH)/common.mk
include $(TMK_PATH)/protocol.mk
@@ -63,7 +63,7 @@ include $(QUANTUM_PATH)/encoder/tests/rules.mk
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
include $(PLATFORM_PATH)/test/rules.mk
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
-include build_full_test.mk
+include $(BUILDDEFS_PATH)/build_full_test.mk
endif
$(TEST)_SRC += \
@@ -77,7 +77,7 @@ $(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
$(TEST_OBJ)/$(TEST)_CONFIG := $($(TEST)_CONFIG)
include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
-include $(TMK_PATH)/rules.mk
+include $(BUILDDEFS_PATH)/common_rules.mk
$(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null)
diff --git a/common_features.mk b/builddefs/common_features.mk
index 7ff19e8084..7ff19e8084 100644
--- a/common_features.mk
+++ b/builddefs/common_features.mk
diff --git a/tmk_core/rules.mk b/builddefs/common_rules.mk
index b303a87919..b303a87919 100644
--- a/tmk_core/rules.mk
+++ b/builddefs/common_rules.mk
diff --git a/testlist.mk b/builddefs/testlist.mk
index 86da5668ac..86da5668ac 100644
--- a/testlist.mk
+++ b/builddefs/testlist.mk
diff --git a/lib/python/qmk/cli/multibuild.py b/lib/python/qmk/cli/multibuild.py
index ad059edff3..dff8c88422 100755
--- a/lib/python/qmk/cli/multibuild.py
+++ b/lib/python/qmk/cli/multibuild.py
@@ -69,7 +69,7 @@ def multibuild(cli):
all: {keyboard_safe}_binary
{keyboard_safe}_binary:
@rm -f "{QMK_FIRMWARE}/.build/failed.log.{keyboard_safe}" || true
- +@$(MAKE) -C "{QMK_FIRMWARE}" -f "{QMK_FIRMWARE}/build_keyboard.mk" KEYBOARD="{keyboard_name}" KEYMAP="{cli.args.keymap}" REQUIRE_PLATFORM_KEY= COLOR=true SILENT=false {' '.join(cli.args.env)} \\
+ +@$(MAKE) -C "{QMK_FIRMWARE}" -f "{QMK_FIRMWARE}/builddefs/build_keyboard.mk" KEYBOARD="{keyboard_name}" KEYMAP="{cli.args.keymap}" REQUIRE_PLATFORM_KEY= COLOR=true SILENT=false {' '.join(cli.args.env)} \\
>>"{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}" 2>&1 \\
|| cp "{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}" "{QMK_FIRMWARE}/.build/failed.log.{os.getpid()}.{keyboard_safe}"
@{{ grep '\[ERRORS\]' "{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}" >/dev/null 2>&1 && printf "Build %-64s \e[1;31m[ERRORS]\e[0m\\n" "{keyboard_name}:{cli.args.keymap}" ; }} \\
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py
index 90a68ca3cd..275cd72e5c 100644
--- a/lib/python/qmk/commands.py
+++ b/lib/python/qmk/commands.py
@@ -213,7 +213,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va
'-r',
'-R',
'-f',
- 'build_keyboard.mk',
+ 'builddefs/build_keyboard.mk',
])
if bootloader:
diff --git a/paths.mk b/paths.mk
index 5a39d00ecd..85ccfa0796 100644
--- a/paths.mk
+++ b/paths.mk
@@ -2,7 +2,9 @@
TOP_DIR = .
TMK_DIR = tmk_core
TMK_PATH = $(TMK_DIR)
-LIB_PATH = lib
+
+LIB_DIR = lib
+LIB_PATH = $(LIB_DIR)
QUANTUM_DIR = quantum
QUANTUM_PATH = $(QUANTUM_DIR)