summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-06 09:20:45 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-06 09:20:45 +0100
commit7e49fe4b9b931f6b0eb3d8ecb3e684daadac9131 (patch)
treec2a09bc746fdf09f517e084c48673bd688a87a09
parent12774274782f461523593c2bfd99c914e949efd3 (diff)
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>
-rwxr-xr-xscript/trees9
1 files changed, 8 insertions, 1 deletions
diff --git a/script/trees b/script/trees
index 21f05e5d..c806b92a 100755
--- a/script/trees
+++ b/script/trees
@@ -59,6 +59,7 @@ build_projects()
[ -f "$listfile" ] || listfile="" # optional on single-tree
dest_dir="$elfdir"
+ elfcheck || return 0
cdir="src/${project}"
[ -d "$cdir" ] || x_ ./update trees -f "$project"
@@ -175,11 +176,17 @@ check_config()
[ -f "$config" ] || $err "check_config $project/$target: no config"
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)
for elftest in "$dest_dir"/*; do
e "$elftest" f && return 1
done
- x_ mkdir -p "$dest_dir"
}
handle_makefile()