summaryrefslogtreecommitdiff
path: root/include/tree.sh
diff options
context:
space:
mode:
Diffstat (limited to 'include/tree.sh')
-rw-r--r--include/tree.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/tree.sh b/include/tree.sh
index 2cd154b2..f534a8fb 100644
--- a/include/tree.sh
+++ b/include/tree.sh
@@ -173,11 +173,17 @@ build_dependencies()
done; :
}
+# get sha512sums of project-related files, concatenate and then
+# get a sha512sum of *that*; cache and re-check to detect changes
check_project_hashes()
{
+ # delete project source tree, if it changes; works for both
+ # single and multi-tree, since "tree" will be blank on single-tree
check_hashes hash "$tree" badhash "$datadir" "$configdir/$tree" \
"$mdir" || x_ rm -Rf "src/$project/$tree" "elf/$project/$tree"; :
+ # check only the given target; delete only the target build
+ # if that's all that changed (not applicable to single-tree)
singletree "$project" || [ -z "$target" ] || \
check_hashes tghash "$target" badtghash "$configdir/$target" || \
x_ rm -Rf "elf/$project/$tree/$target"; :