diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index e327ee40a6df..71988e526369 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -222,8 +222,8 @@ clean_dep lib/libc statfs c # 20240308 e6ffc7669a56 Remove pointless MD syscall(2) # 20240308 0ee0ae237324 Remove pointless MD syscall(2) # 20240308 7b3836c28188 Remove pointless MD syscall(2) -if [ ${MACHINE} != i386 -a -f "$OBJTOP"/lib/libsys/.depend.syscall.o && \ - grep -eq 'libsys/[^ /]*/syscall.S' "$OBJTOP"/lib/libsys/.depend.syscall.*; then +if [ ${MACHINE} != i386 -a -f "$OBJTOP"/lib/libsys/.depend.syscall.o ] && \ + grep -q -e 'libsys/[^ /]*/syscall.S' "$OBJTOP"/lib/libsys/.depend.syscall.*; then echo "Removing stale /syscall.S depends" clean_dep lib/libsys syscall S clean_dep lib/libc syscall S