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

@@ -16,19 +16,19 @@ class CrosstoolNgComponent(common.Component):
# https://github.com/crosstool-ng/crosstool-ng/issues/1021
os.chdir(common.crosstool_ng_src_dir)
common.run_cmd(
[os.path.join(common.crosstool_ng_src_dir, 'bootstrap')],
[os.path.join(common.crosstool_ng_src_dir, 'bootstrap'), common.Newline],
)
os.chdir(common.crosstool_ng_util_dir)
common.run_cmd(
[
os.path.join(common.crosstool_ng_src_dir, 'configure'),
'--enable-local',
os.path.join(common.crosstool_ng_src_dir, 'configure'), common.Newline,
'--enable-local', common.Newline,
],
)
common.run_cmd(
[
'make',
'-j', str(args.nproc),
'make', common.Newline,
'-j', str(args.nproc), common.Newline,
],
)
@@ -47,16 +47,16 @@ class CrosstoolNgComponent(common.Component):
)
common.run_cmd(
[
common.crosstool_ng_executable,
'defconfig',
common.crosstool_ng_executable, common.Newline,
'defconfig', common.Newline,
],
)
os.unlink(defconfig_dest)
common.run_cmd(
[
common.crosstool_ng_executable,
'build',
'CT_JOBS={}'.format(str(args.nproc)),
common.crosstool_ng_executable, common.Newline,
'build', common.Newline,
'CT_JOBS={}'.format(str(args.nproc)), common.Newline,
],
out_file=os.path.join(build_dir, 'lkmc.log'),
delete_env=['LD_LIBRARY_PATH'],