manually encode newlines on all printed commands

This way we group key value arguments: e.g.:

    make \
    -j 8 \
    all

instead of:

    make \
    -j \
    8 \
    all

and reach CLI nirvana, while also subtly breaking several commands due to
lack of testing.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-11-04 00:00:00 +00:00
parent 196dd616ff
commit 8fb9db3931
16 changed files with 263 additions and 211 deletions

View File

@@ -66,12 +66,12 @@ Configure the kernel, but don't build it.
else:
cc = gcc
common_make_args = [
'make',
'-j', str(args.nproc),
'ARCH={}'.format(common.linux_arch),
'CROSS_COMPILE={}'.format(prefix),
'CC={}'.format(cc),
'O={}'.format(build_dir),
'make', common.Newline,
'-j', str(args.nproc), common.Newline,
'ARCH={}'.format(common.linux_arch), common.Newline,
'CROSS_COMPILE={}'.format(prefix), common.Newline,
'CC={}'.format(cc), common.Newline,
'O={}'.format(build_dir), common.Newline,
]
if args.verbose:
verbose = ['V=1']
@@ -99,17 +99,17 @@ Configure the kernel, but don't build it.
)
common.run_cmd(
[
os.path.join(common.linux_src_dir, 'scripts', 'kconfig', 'merge_config.sh'),
'-m',
'-O', build_dir,
os.path.join(build_dir, '.config'),
os.path.join(common.linux_src_dir, 'scripts', 'kconfig', 'merge_config.sh'), common.Newline,
'-m', common.Newline,
'-O', build_dir, common.Newline,
os.path.join(build_dir, '.config'), common.Newline,
] +
config_fragments
)
common.run_cmd(
(
common_make_args +
['olddefconfig']
['olddefconfig', common.Newline]
),
**common_args
)
@@ -117,7 +117,7 @@ Configure the kernel, but don't build it.
common.run_cmd(
(
common_make_args +
args.extra_make_args
common.add_newlines(args.extra_make_args)
),
**common_args
)