[Cleanup] Handling of optional *.mk files (#24952)

replace check + `include` with `-include`
This commit is contained in:
Pablo Martínez 2025-02-28 18:39:43 +01:00 committed by GitHub
parent 6ee806f376
commit e62352e606
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,21 +97,12 @@ endif
# Pull in rules.mk files from all our subfolders # Pull in rules.mk files from all our subfolders
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/rules.mk)","") -include $(KEYBOARD_PATH_5)/rules.mk
include $(KEYBOARD_PATH_5)/rules.mk -include $(KEYBOARD_PATH_4)/rules.mk
endif -include $(KEYBOARD_PATH_3)/rules.mk
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/rules.mk)","") -include $(KEYBOARD_PATH_2)/rules.mk
include $(KEYBOARD_PATH_4)/rules.mk -include $(KEYBOARD_PATH_1)/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
# Create dependencies on DD keyboard config - structure validated elsewhere # Create dependencies on DD keyboard config - structure validated elsewhere
DD_CONFIG_FILES := DD_CONFIG_FILES :=
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/info.json)","") ifneq ("$(wildcard $(KEYBOARD_PATH_1)/info.json)","")
@ -487,21 +478,11 @@ ifneq ("$(CONVERTER)","")
endif endif
# Pull in post_rules.mk files from all our subfolders # 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
include $(KEYBOARD_PATH_1)/post_rules.mk -include $(KEYBOARD_PATH_2)/post_rules.mk
endif -include $(KEYBOARD_PATH_3)/post_rules.mk
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/post_rules.mk)","") -include $(KEYBOARD_PATH_4)/post_rules.mk
include $(KEYBOARD_PATH_2)/post_rules.mk -include $(KEYBOARD_PATH_5)/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
define post_rules_mk_community_module_includer define post_rules_mk_community_module_includer
ifneq ("$(wildcard $(1)/post_rules.mk)","") ifneq ("$(wildcard $(1)/post_rules.mk)","")