From d8a8a1c62269b09f1ffc8cfd1ee8f3ff6b8f1724 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 13 May 2023 02:52:42 +0100 Subject: build/boot/roms: don't use subshells frivilously use make -BC instead of cd --- resources/scripts/build/boot/roms_helper | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'resources/scripts') diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper index 1eb90a8a..7e60ee6a 100755 --- a/resources/scripts/build/boot/roms_helper +++ b/resources/scripts/build/boot/roms_helper @@ -386,10 +386,7 @@ build_rom_images() done done - ( - cd "${cbdir}" - make distclean # TODO: do make clean instead (avoid re-building utils) - ) + make distclean -BC "${cbdir}" } # Main ROM building function. This calls all other functions @@ -481,26 +478,19 @@ mkCoreboot() printf "%s-%s\n" "$(cat projectname)" "$(cat version)" \ > "${cbdir}/.coreboot-version" - ( if [ -f "${cbfstool}" ]; then mv "${cbfstool}" "${cbdir}/cbfstool" fi - cd "${cbdir}" - make distclean - cd - + make clean -BC "${cbdir}" if [ -f "${cbdir}/cbfstool" ]; then mv "${cbdir}/cbfstool" "${cbfstool}" fi - ) cp "${_cbcfg}" "${cbdir}"/.config ./build module cbutils ${cbdir#coreboot/} || exit 1 - ( - cd "${cbdir}" - make -j$(nproc) - ) + make -j$(nproc) -BC "${cbdir}" } # make a rom in /tmp/ and then print the path of that ROM -- cgit v1.2.1