aboutsummaryrefslogtreecommitdiff
path: root/tools/build/depend-cleanup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/depend-cleanup.sh')
-rwxr-xr-xtools/build/depend-cleanup.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
index 39b06b45d45f..195162d3efc8 100755
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -37,6 +37,15 @@ clean_dep()
"$OBJTOP"/obj-lib32/$1/.depend.$2.* \
"$OBJTOP"/obj-lib32/$1/$2.*o
fi
+ if [ -e "$OBJTOP"/$1/.depend.$2.o ] && \
+ egrep -qw "$2\.$3" "$OBJTOP"/$1/.depend.$2.o; then \
+ echo "Removing stale dependencies and objects for $2.$3"; \
+ rm -f \
+ "$OBJTOP"/$1/.depend.$2.* \
+ "$OBJTOP"/$1/$2.*o \
+ "$OBJTOP"/obj-lib32/$1/.depend.$2.* \
+ "$OBJTOP"/obj-lib32/$1/$2.*o
+ fi
}
# Date Rev Description
@@ -90,3 +99,14 @@ fi
if [ "$MACHINE_ARCH" = "amd64" ]; then
clean_dep lib/libc bcmp c
fi
+
+# 20220524 68fe988a40ca kqueue_test binary replaced shell script
+if stat "$OBJTOP"/tests/sys/kqueue/libkqueue/*kqtest* \
+ "$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.kqtest* >/dev/null 2>&1; then
+ echo "Removing old kqtest"
+ rm -f "$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.* \
+ "$OBJTOP"/tests/sys/kqueue/libkqueue/*
+fi
+
+# 20221115 42d10b1b56f2 move from rs.c to rs.cc
+clean_dep usr.bin/rs rs c