diff options
Diffstat (limited to 'lib/python/qmk/cli/generate/config_h.py')
-rwxr-xr-x | lib/python/qmk/cli/generate/config_h.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index 64d4db6ffe..828785ea48 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -15,7 +15,12 @@ from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE def generate_define(define, value=None): + is_keymap = cli.args.filename value = f' {value}' if value is not None else '' + if is_keymap: + return f""" +#undef {define} +#define {define}{value}""" return f""" #ifndef {define} # define {define}{value} |