mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 18:34:57 +02:00
trees: skip single-tree build if a build exists
this replicates the same behaviour as multi-tree builds, checking for files inside the relevant elf/ directory Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+8
-1
@@ -59,6 +59,7 @@ build_projects()
|
|||||||
[ -f "$listfile" ] || listfile="" # optional on single-tree
|
[ -f "$listfile" ] || listfile="" # optional on single-tree
|
||||||
|
|
||||||
dest_dir="$elfdir"
|
dest_dir="$elfdir"
|
||||||
|
elfcheck || return 0
|
||||||
|
|
||||||
cdir="src/${project}"
|
cdir="src/${project}"
|
||||||
[ -d "$cdir" ] || x_ ./update trees -f "$project"
|
[ -d "$cdir" ] || x_ ./update trees -f "$project"
|
||||||
@@ -175,11 +176,17 @@ check_config()
|
|||||||
[ -f "$config" ] || $err "check_config $project/$target: no config"
|
[ -f "$config" ] || $err "check_config $project/$target: no config"
|
||||||
|
|
||||||
dest_dir="$elfdir/$target/$config_name"
|
dest_dir="$elfdir/$target/$config_name"
|
||||||
|
elfcheck || return 1 # skip build if a previous one exists
|
||||||
|
|
||||||
|
x_ mkdir -p "$dest_dir"
|
||||||
|
}
|
||||||
|
|
||||||
|
elfcheck()
|
||||||
|
{
|
||||||
# TODO: very hacky check. do it properly (based on build.list)
|
# TODO: very hacky check. do it properly (based on build.list)
|
||||||
for elftest in "$dest_dir"/*; do
|
for elftest in "$dest_dir"/*; do
|
||||||
e "$elftest" f && return 1
|
e "$elftest" f && return 1
|
||||||
done
|
done
|
||||||
x_ mkdir -p "$dest_dir"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_makefile()
|
handle_makefile()
|
||||||
|
|||||||
Reference in New Issue
Block a user