Preprocessor consistency.
This commit is contained in:
parent
368972afa6
commit
e86d8d248f
2 changed files with 3 additions and 3 deletions
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue