mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
build-doc: make work when run from subdirectories
This in particular had broken ./build --download-dependencies -aA -aa -ax all not sure why, but there must be a change in directory somewhere then. The only chdir we do in this repo was for ctng crap, I'm also restoring that chdir back after we are done.
This commit is contained in:
@@ -32,9 +32,9 @@ Build crosstool-NG with Newlib for bare metal compilation
|
||||
self.env['crosstool_ng_source_dir'],
|
||||
self.env['crosstool_ng_source_copy_dir'],
|
||||
)
|
||||
os.chdir(self.env['crosstool_ng_source_copy_dir'])
|
||||
self.sh.run_cmd(
|
||||
[os.path.join(self.env['crosstool_ng_source_copy_dir'], 'bootstrap'), LF],
|
||||
cwd=self.env['crosstool_ng_source_copy_dir'],
|
||||
)
|
||||
self.sh.run_cmd(
|
||||
[
|
||||
@@ -44,8 +44,12 @@ Build crosstool-NG with Newlib for bare metal compilation
|
||||
os.path.join(os.curdir, 'configure'), LF,
|
||||
'--enable-local', LF,
|
||||
],
|
||||
cwd=self.env['crosstool_ng_source_copy_dir'],
|
||||
)
|
||||
self.sh.run_cmd(
|
||||
['make', '-j', str(self.env['nproc']), LF],
|
||||
cwd=self.env['crosstool_ng_source_copy_dir'],
|
||||
)
|
||||
self.sh.run_cmd(['make', '-j', str(self.env['nproc']), LF])
|
||||
|
||||
# Build the toolchain.
|
||||
self.sh.cp(
|
||||
@@ -65,6 +69,7 @@ Build crosstool-NG with Newlib for bare metal compilation
|
||||
self.env['crosstool_ng_executable'], LF,
|
||||
'defconfig', LF,
|
||||
],
|
||||
cwd=self.env['crosstool_ng_source_copy_dir'],
|
||||
)
|
||||
self.sh.rmrf(defconfig_dest)
|
||||
self.sh.run_cmd(
|
||||
@@ -73,6 +78,7 @@ Build crosstool-NG with Newlib for bare metal compilation
|
||||
'build', LF,
|
||||
'CT_JOBS={}'.format(str(self.env['nproc'])), LF,
|
||||
],
|
||||
cwd=self.env['crosstool_ng_source_copy_dir'],
|
||||
out_file=os.path.join(build_dir, self.env['repo_short_id'] + '.log'),
|
||||
delete_env=['LD_LIBRARY_PATH'],
|
||||
extra_paths=[self.env['ccache_dir']],
|
||||
|
||||
Reference in New Issue
Block a user