workaround make bugs

This commit is contained in:
2024-05-21 17:56:23 -04:00
parent 8bea538b1f
commit 78820d1058

View File

@@ -583,12 +583,19 @@ fromSource() {
;;
esac
if [[ -d "$GITWORKTREEDIR" ]]; then
execute git -C "$GITWORKTREEDIR" checkout "$wt_commit"
execute git -C "$GITWORKTREEDIR" pull
else
# TODO There's a bug in the make clean functions that seem to invoke a full make
# if [[ -d "$GITWORKTREEDIR" ]]; then
# execute git -C "$GITWORKTREEDIR" checkout "$wt_commit"
# execute git -C "$GITWORKTREEDIR" pull
# else
# execute git -C "$GITSRCDIR" worktree add --force --detach "$GITWORKTREEDIR" "$wt_commit"
# fi
# To workaround bug, don't use make *clean, blow it away and start fresh
[[ -d "$GITWORKTREEDIR" ]] && execute rm -rf "$GITWORKTREEDIR"
execute git -C "$GITSRCDIR" worktree add --force --detach "$GITWORKTREEDIR" "$wt_commit"
fi
# Print commit information
commit=$(git -C "$GITWORKTREEDIR" rev-parse HEAD)
@@ -670,7 +677,7 @@ fromSource() {
# Make prep
(( DEBUG )) && make_opts+=("V=s")
execute make "${make_opts[@]}" "-j1" targetclean # TODO 'dirclean' has a bug that triggers menuconfig
#execute make "${make_opts[@]}" "-j1" dirclean # TODO 'dirclean' has a bug that triggers menuconfig
execute make "${make_opts[@]}" "-j1" defconfig
execute make "${make_opts[@]}" "-j1" download