pfctl: Fix NOCLEAN build

We've created a new pf_ruleset.c file for pfctl and no longer use the
kernel vrsion, but the build system doesn't handle this dependency
change correctly. Delete the dependency file if it contains the kernel
version of the file.

MFC after:	2 weeks
This commit is contained in:
Kristof Provost 2021-01-06 22:07:25 +01:00
parent ca71c7e3bb
commit c38e59ce1b

View File

@ -56,3 +56,11 @@ if [ -e "$OBJTOP"/rescue/rescue/rescue.c ] && \
echo "Removing old rescue(8) tree"
rm -rf "$OBJTOP"/rescue/rescue
fi
# 20210105 fda7daf06301 pfctl gained its own version of pf_ruleset.c
if [ -e "$OBJTOP"/sbin/pfctl/.depend.pf_ruleset.o ] && \
egrep -qw "sys/netpfil/pf/pf_ruleset.c" \
"$OBJTOP"/sbin/pfctl/.depend.pf_ruleset.o; then
echo "Removing old pf_ruleset dependecy file"
rm -rf "$OBJTOP"/sbin/pfctl/.depend.pf_ruleset.o
fi