run coreboot utils from own directory

this means coreboot can now be distcleaned safely,
before and after each build of a rom image

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2023-06-24 23:23:16 +01:00
parent 4a49ea3599
commit 941fbcbf1b
6 changed files with 29 additions and 38 deletions
+11 -4
View File
@@ -59,10 +59,17 @@ buildutils() {
./download coreboot $cbtree || return 1
fi
for util in cbfstool ifdtool; do
utildir="coreboot/${cbtree}/util/${util}/"
make distclean -C "${utildir}"
make -j$(nproc) -C "${utildir}" \
|| return 1
[ -f "cbutils/${cbtree}/${util}" ] \
&& continue
if [ ! -d "cbutils/${cbtree}" ]; then
mkdir -p "cbutils/${cbtree}" || return 1
fi
utildir="coreboot/${cbtree}/util/${util}"
make distclean -C "${utildir}" || return 1
make -j$(nproc) -C "${utildir}" || return 1
mv "${utildir}/${util}" "cbutils/${cbtree}" || return 1
make distclean -C "${utildir}" || return 1
done
}