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

@@ -56,17 +56,17 @@ has the OpenBLAS libraries and headers installed.
common.run_cmd(
(
[
'make',
'-j', str(args.nproc),
'CC={}'.format(cc),
'CXX={}'.format(cxx),
'PKG_CONFIG={}'.format(common.buildroot_pkg_config),
'STAGING_DIR={}'.format(common.buildroot_staging_dir),
'OUT_DIR={}'.format(build_dir),
'make', common.Newline,
'-j', str(args.nproc), common.Newline,
'CC={}'.format(cc), common.Newline,
'CXX={}'.format(cxx), common.Newline,
'PKG_CONFIG={}'.format(common.buildroot_pkg_config), common.Newline,
'STAGING_DIR={}'.format(common.buildroot_staging_dir), common.Newline,
'OUT_DIR={}'.format(build_dir), common.Newline,
] +
['HAS_{}=y'.format(package.upper()) for package in args.has_package] +
common.add_newlines(['HAS_{}=y'.format(package.upper()) for package in args.has_package]) +
shlex.split(args.make_args) +
[os.path.join(build_dir, os.path.splitext(os.path.split(target)[1])[0]) + common.userland_build_ext for target in args.targets]
common.add_newlines([os.path.join(build_dir, os.path.splitext(os.path.split(target)[1])[0]) + common.userland_build_ext for target in args.targets])
),
cwd=common.userland_src_dir,
extra_paths=[common.ccache_dir],