diff options
| author | Ryan <fauxpark@gmail.com> | 2021-03-04 15:09:22 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-04 15:09:22 +1100 |
| commit | 6461087c865bc4af30ac8521af9db785afb662a0 (patch) | |
| tree | 008e8a5d4d93c4046319d9b8bf5107a8e8634934 /lib/python/qmk | |
| parent | 7aa74c227b03e882915b184d07a5e31c9d720710 (diff) | |
| download | qmk_firmware-6461087c865bc4af30ac8521af9db785afb662a0.tar.gz qmk_firmware-6461087c865bc4af30ac8521af9db785afb662a0.zip | |
`qmk generate-rules-mk`: add `--escape` switch for makefile logic (#12101)
Diffstat (limited to 'lib/python/qmk')
| -rwxr-xr-x | lib/python/qmk/cli/generate/rules_mk.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/generate/rules_mk.py b/lib/python/qmk/cli/generate/rules_mk.py index c21ab5090..15917987b 100755 --- a/lib/python/qmk/cli/generate/rules_mk.py +++ b/lib/python/qmk/cli/generate/rules_mk.py | |||
| @@ -36,6 +36,7 @@ def process_mapping_rule(kb_info_json, rules_key, info_dict): | |||
| 36 | 36 | ||
| 37 | @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') | 37 | @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') |
| 38 | @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") | 38 | @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") |
| 39 | @cli.argument('-e', '--escape', arg_only=True, action='store_true', help="Escape spaces in quiet mode") | ||
| 39 | @cli.argument('-kb', '--keyboard', help='Keyboard to generate config.h for.') | 40 | @cli.argument('-kb', '--keyboard', help='Keyboard to generate config.h for.') |
| 40 | @cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True) | 41 | @cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True) |
| 41 | @automagic_keyboard | 42 | @automagic_keyboard |
| @@ -83,7 +84,10 @@ def generate_rules_mk(cli): | |||
| 83 | cli.args.output.write_text(rules_mk) | 84 | cli.args.output.write_text(rules_mk) |
| 84 | 85 | ||
| 85 | if cli.args.quiet: | 86 | if cli.args.quiet: |
| 86 | print(cli.args.output) | 87 | if cli.args.escape: |
| 88 | print(cli.args.output.as_posix().replace(' ', '\\ ')) | ||
| 89 | else: | ||
| 90 | print(cli.args.output) | ||
| 87 | else: | 91 | else: |
| 88 | cli.log.info('Wrote rules.mk to %s.', cli.args.output) | 92 | cli.log.info('Wrote rules.mk to %s.', cli.args.output) |
| 89 | 93 | ||
