From e87dba45a59e069b71d2ec994e47443357fe6b39 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Sat, 16 Sep 2017 02:49:36 -0400 Subject: Strip subshell group from SeaBIOS build action Absolute pathnames are used so there's not actually any need to go through the process of setting up a subshell and changing directory as long as the '-C' flag is passed to Make. --- projects/seabios/seabios | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'projects/seabios') diff --git a/projects/seabios/seabios b/projects/seabios/seabios index b9e0882a..0819e1ed 100755 --- a/projects/seabios/seabios +++ b/projects/seabios/seabios @@ -57,6 +57,7 @@ update_check() { } build() { + local target="$1" local repository="${project}" project_sources_directory_missing_empty_error "${project}" "${repository}" "$@" @@ -71,23 +72,19 @@ build() { local build_path="$(project_build_path "${project}" "$@")" mkdir -p "${build_path}" + cp "${seabios_config_path}" "${sources_path}/.config" - ( - cd "${sources_path}" + make -C "${sources_path}" -j"${TASKS}" - cp "${seabios_config_path}" .config - - make -j"${TASKS}" + if [[ "${target}" == 'txtmode' ]]; then + cp "${sources_path}/out/bios.bin.elf" "${build_path}" + elif [[ "${target}" == 'vga' ]]; then + cp "${sources_path}/out/vgabios.bin" "${build_path}" + fi - if [[ "$1" == 'txtmode' ]]; then - cp out/bios.bin.elf "${build_path}" - elif [[ "$1" == 'vga' ]]; then - cp out/vgabios.bin "${build_path}" - fi + make -C "${sources_path}" distclean - make distclean - rm -f .config - ) + rm -f "${sources_path}/.config" } build_check() { -- cgit v1.2.3-70-g09d2