From e62352e606b1dacccae8b15c825229d18d60044c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Mart=C3=ADnez?= <58857054+elpekenin@users.noreply.github.com> Date: Fri, 28 Feb 2025 18:39:43 +0100 Subject: [PATCH] [Cleanup] Handling of optional `*.mk` files (#24952) replace check + `include` with `-include` --- builddefs/build_keyboard.mk | 41 ++++++++++--------------------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index c5fc9cd25d0..fb07042bb79 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -97,21 +97,12 @@ endif # Pull in rules.mk files from all our subfolders -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/rules.mk)","") - include $(KEYBOARD_PATH_5)/rules.mk -endif -ifneq ("$(wildcard $(KEYBOARD_PATH_4)/rules.mk)","") - include $(KEYBOARD_PATH_4)/rules.mk -endif -ifneq ("$(wildcard $(KEYBOARD_PATH_3)/rules.mk)","") - include $(KEYBOARD_PATH_3)/rules.mk -endif -ifneq ("$(wildcard $(KEYBOARD_PATH_2)/rules.mk)","") - include $(KEYBOARD_PATH_2)/rules.mk -endif -ifneq ("$(wildcard $(KEYBOARD_PATH_1)/rules.mk)","") - include $(KEYBOARD_PATH_1)/rules.mk -endif +-include $(KEYBOARD_PATH_5)/rules.mk +-include $(KEYBOARD_PATH_4)/rules.mk +-include $(KEYBOARD_PATH_3)/rules.mk +-include $(KEYBOARD_PATH_2)/rules.mk +-include $(KEYBOARD_PATH_1)/rules.mk + # Create dependencies on DD keyboard config - structure validated elsewhere DD_CONFIG_FILES := ifneq ("$(wildcard $(KEYBOARD_PATH_1)/info.json)","") @@ -487,21 +478,11 @@ ifneq ("$(CONVERTER)","") endif # Pull in post_rules.mk files from all our subfolders -ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_rules.mk)","") - include $(KEYBOARD_PATH_1)/post_rules.mk -endif -ifneq ("$(wildcard $(KEYBOARD_PATH_2)/post_rules.mk)","") - include $(KEYBOARD_PATH_2)/post_rules.mk -endif -ifneq ("$(wildcard $(KEYBOARD_PATH_3)/post_rules.mk)","") - include $(KEYBOARD_PATH_3)/post_rules.mk -endif -ifneq ("$(wildcard $(KEYBOARD_PATH_4)/post_rules.mk)","") - include $(KEYBOARD_PATH_4)/post_rules.mk -endif -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_rules.mk)","") - include $(KEYBOARD_PATH_5)/post_rules.mk -endif +-include $(KEYBOARD_PATH_1)/post_rules.mk +-include $(KEYBOARD_PATH_2)/post_rules.mk +-include $(KEYBOARD_PATH_3)/post_rules.mk +-include $(KEYBOARD_PATH_4)/post_rules.mk +-include $(KEYBOARD_PATH_5)/post_rules.mk define post_rules_mk_community_module_includer ifneq ("$(wildcard $(1)/post_rules.mk)","")