build/boot/roms: don't use subshells frivilously

use make -BC instead of cd
This commit is contained in:
Leah Rowe
2023-05-13 02:52:42 +01:00
parent 834be77c1d
commit d8a8a1c622
+3 -13
View File
@@ -386,10 +386,7 @@ build_rom_images()
done done
done done
( make distclean -BC "${cbdir}"
cd "${cbdir}"
make distclean # TODO: do make clean instead (avoid re-building utils)
)
} }
# Main ROM building function. This calls all other functions # Main ROM building function. This calls all other functions
@@ -481,26 +478,19 @@ mkCoreboot()
printf "%s-%s\n" "$(cat projectname)" "$(cat version)" \ printf "%s-%s\n" "$(cat projectname)" "$(cat version)" \
> "${cbdir}/.coreboot-version" > "${cbdir}/.coreboot-version"
(
if [ -f "${cbfstool}" ]; then if [ -f "${cbfstool}" ]; then
mv "${cbfstool}" "${cbdir}/cbfstool" mv "${cbfstool}" "${cbdir}/cbfstool"
fi fi
cd "${cbdir}" make clean -BC "${cbdir}"
make distclean
cd -
if [ -f "${cbdir}/cbfstool" ]; then if [ -f "${cbdir}/cbfstool" ]; then
mv "${cbdir}/cbfstool" "${cbfstool}" mv "${cbdir}/cbfstool" "${cbfstool}"
fi fi
)
cp "${_cbcfg}" "${cbdir}"/.config cp "${_cbcfg}" "${cbdir}"/.config
./build module cbutils ${cbdir#coreboot/} || exit 1 ./build module cbutils ${cbdir#coreboot/} || exit 1
( make -j$(nproc) -BC "${cbdir}"
cd "${cbdir}"
make -j$(nproc)
)
} }
# make a rom in /tmp/ and then print the path of that ROM # make a rom in /tmp/ and then print the path of that ROM