move handle_coreboot_utils to script/trees
it doesn't really make sense placed in lib.sh, because it's only called from script/trees Signed-off-by: Leah Rowe <leah@libreboot.org>audit2-merge1
parent
ff16d27991
commit
1d7a6f04c9
|
@ -154,22 +154,6 @@ check_defconfig()
|
|||
done
|
||||
}
|
||||
|
||||
handle_coreboot_utils()
|
||||
{
|
||||
for util in cbfstool ifdtool; do
|
||||
utilelfdir="elf/$util/$1"
|
||||
utilsrcdir="src/coreboot/$1/util/$util"
|
||||
|
||||
utilmode=""
|
||||
[ -z "$mode" ] || utilmode="clean"
|
||||
x_ make -C "$utilsrcdir" $utilmode
|
||||
[ -z "$mode" ] && [ ! -f "$utilelfdir/$util" ] && \
|
||||
x_ mkdir -p "$utilelfdir" && \
|
||||
x_ cp "$utilsrcdir/$util" "elf/$util/$1"
|
||||
[ -z "$mode" ] || x_ rm -Rf "$utilelfdir"
|
||||
done
|
||||
}
|
||||
|
||||
remkdir()
|
||||
{
|
||||
rm -Rf "$1" || $err "remkdir: !rm -Rf \"$1\""
|
||||
|
|
18
script/trees
18
script/trees
|
@ -103,7 +103,7 @@ handle_defconfig()
|
|||
handle_src_tree "$target" || return 0
|
||||
|
||||
[ "$target1" = "utils" ] && [ "$project" = "coreboot" ] && \
|
||||
eval "handle_coreboot_utils \"$tree\"; return 0"
|
||||
eval "check_coreboot_utils \"$tree\"; return 0"
|
||||
|
||||
for y in "$target_dir/config"/*; do
|
||||
[ -f "$y" ] || continue
|
||||
|
@ -169,6 +169,22 @@ check_cross_compiler()
|
|||
done
|
||||
}
|
||||
|
||||
check_coreboot_utils()
|
||||
{
|
||||
for util in cbfstool ifdtool; do
|
||||
utilelfdir="elf/$util/$1"
|
||||
utilsrcdir="src/coreboot/$1/util/$util"
|
||||
|
||||
utilmode=""
|
||||
[ -z "$mode" ] || utilmode="clean"
|
||||
x_ make -C "$utilsrcdir" $utilmode
|
||||
[ -z "$mode" ] && [ ! -f "$utilelfdir/$util" ] && \
|
||||
x_ mkdir -p "$utilelfdir" && \
|
||||
x_ cp "$utilsrcdir/$util" "elf/$util/$1"
|
||||
[ -z "$mode" ] || x_ rm -Rf "$utilelfdir"
|
||||
done
|
||||
}
|
||||
|
||||
check_config()
|
||||
{
|
||||
[ -f "$config" ] || $err "check_config $project/$target: no config"
|
||||
|
|
Loading…
Reference in New Issue