depend-cleanup.sh: Fix overzealous syscall.S cleanup on non-amd64

Although there is no longer a syscall.S in the source tree, the
generated file is still called syscall.S, so the syscall\.S regex still
matches the .depend file. Previously it looked like:

    syscall.o \
      /path/to/src/lib/libc/MACHINE/sys/syscall.S \
      ...

or

    syscall.o \
      /path/to/src/lib/libsys/MACHINE/syscall.S \
      ...

Now it looks like:

    syscall.o: syscall.S \
      ...

Thus, match on the file having a directory specified, to distinguish it from
the generated case where it's adjacent in the OBJDIR. Note the .* is needed due
to the use of egrep -w.

Fixes:	3a4b04e82d ("depend-cleanup.sh: Simplify handling for stale syscall.S")
This commit is contained in:
Jessica Clarke 2024-09-10 18:54:45 +01:00
parent 0980d0a037
commit 1a55697719

View file

@ -173,8 +173,8 @@ clean_dep lib/libc statfs c
# 20240308 0ee0ae237324 Remove pointless MD syscall(2)
# 20240308 7b3836c28188 Remove pointless MD syscall(2)
if [ ${MACHINE} != i386 ]; then
clean_dep lib/libsys syscall S
clean_dep lib/libc syscall S
clean_dep lib/libsys syscall S ".*/syscall\.S"
clean_dep lib/libc syscall S ".*/syscall\.S"
fi
# 20240416 2fda3ab0ac19 WITH_NVME: Remove from broken