Preprocessor consistency.

This commit is contained in:
Nick Brassel 2025-02-06 16:48:26 +11:00
commit e86d8d248f
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -61,14 +61,14 @@ def generate_modules_rules(keyboard, filename):
modules = get_modules(keyboard, filename)
if len(modules) > 0:
lines.append('')
lines.append('OPT_DEFS += -DCOMMUNITY_MODULES_ENABLED=TRUE')
lines.append('OPT_DEFS += -DCOMMUNITY_MODULES_ENABLE=TRUE')
for module in modules:
module_path = find_module_path(module)
if not module_path:
raise FileNotFoundError(f"Module '{module}' not found.")
lines.append('')
lines.append(f'COMMUNITY_MODULES += {module_path.name}') # use module_path here instead of module as it may be a subdirectory
lines.append(f'OPT_DEFS += -DCOMMUNITY_MODULE_{module_path.name.upper()}=TRUE')
lines.append(f'OPT_DEFS += -DCOMMUNITY_MODULE_{module_path.name.upper()}_ENABLE=TRUE')
lines.append(f'VPATH += {module_path}')
lines.append(f'SRC += $(wildcard {module_path}/{module_path.name}.c)')
lines.append(f'-include {module_path}/rules.mk')

View file

@ -244,7 +244,7 @@ extern layer_state_t layer_state;
# include "layer_lock.h"
#endif
#ifdef COMMUNITY_MODULES_ENABLED
#ifdef COMMUNITY_MODULES_ENABLE
# include "community_modules.h"
#endif