summaryrefslogtreecommitdiff
path: root/resources/scripts/build/boot/roms_helper
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-05-13 02:52:42 +0100
committerLeah Rowe <leah@libreboot.org>2023-05-13 02:52:42 +0100
commitd8a8a1c62269b09f1ffc8cfd1ee8f3ff6b8f1724 (patch)
tree04628e665dbbbadae8e94b49fd76c7e91ca0cd31 /resources/scripts/build/boot/roms_helper
parent834be77c1d2c1e4271f534262380b68db369c929 (diff)
build/boot/roms: don't use subshells frivilously
use make -BC instead of cd
Diffstat (limited to 'resources/scripts/build/boot/roms_helper')
-rwxr-xr-xresources/scripts/build/boot/roms_helper16
1 files changed, 3 insertions, 13 deletions
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