diff --git a/script/trees b/script/trees index 5113e98..4d0b0f6 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" @@ -173,11 +174,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()