diff options
Diffstat (limited to 'lib/python/qmk/commands.py')
-rw-r--r-- | lib/python/qmk/commands.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 421453d837..5a01943773 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -28,7 +28,7 @@ def _find_make(): return make_cmd -def create_make_target(target, parallel=1, **env_vars): +def create_make_target(target, dry_run=False, parallel=1, **env_vars): """Create a make command Args: @@ -36,6 +36,9 @@ def create_make_target(target, parallel=1, **env_vars): target Usually a make rule, such as 'clean' or 'all'. + dry_run + make -n -- don't actually build + parallel The number of make jobs to run in parallel @@ -52,10 +55,10 @@ def create_make_target(target, parallel=1, **env_vars): for key, value in env_vars.items(): env.append(f'{key}={value}') - return [make_cmd, *get_make_parallel_args(parallel), *env, target] + return [make_cmd, *(['-n'] if dry_run else []), *get_make_parallel_args(parallel), *env, target] -def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars): +def create_make_command(keyboard, keymap, target=None, dry_run=False, parallel=1, **env_vars): """Create a make compile command Args: @@ -69,6 +72,9 @@ def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars): target Usually a bootloader. + dry_run + make -n -- don't actually build + parallel The number of make jobs to run in parallel @@ -84,7 +90,7 @@ def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars): if target: make_args.append(target) - return create_make_target(':'.join(make_args), parallel, **env_vars) + return create_make_target(':'.join(make_args), dry_run=dry_run, parallel=parallel, **env_vars) def get_git_version(current_time, repo_dir='.', check_dir='.'): @@ -184,7 +190,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va target = f'{keyboard_filesafe}_{user_keymap["keymap"]}' keyboard_output = Path(f'{KEYBOARD_OUTPUT_PREFIX}{keyboard_filesafe}') keymap_output = Path(f'{keyboard_output}_{user_keymap["keymap"]}') - c_text = qmk.keymap.generate_c(user_keymap['keyboard'], user_keymap['layout'], user_keymap['layers']) + c_text = qmk.keymap.generate_c(user_keymap) keymap_dir = keymap_output / 'src' keymap_c = keymap_dir / 'keymap.c' @@ -233,7 +239,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va f'VERBOSE={verbose}', f'COLOR={color}', 'SILENT=false', - f'QMK_BIN={"bin/qmk" if "DEPRECATED_BIN_QMK" in os.environ else "qmk"}', + 'QMK_BIN="qmk"', ]) return make_command |