xen/build: Fix `make cscope` rune
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 16 Dec 2021 02:38:57 +0000 (02:38 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 16 Dec 2021 20:27:12 +0000 (20:27 +0000)
commitfa3cc3ff3b7685dd6b930d1901d8de7be9527794
tree7553dfb05132ce3805f9e0ace28186b78bc7f308
parentc5f39993e42d0d26fbfdcfde4e95651a23748ee0
xen/build: Fix `make cscope` rune

There are two problems, both in the all_sources definition.

First, everything in arch/*/include gets double hits with cscope queries,
because they end up getting listed twice in cscope.files.

Drop the first `find` rune of the three, because it's redundant with the third
rune following c/s 725381a5eab3 ("xen: move include/asm-* to
arch/*/include/asm").

Second, and this way for a long time:

  $ make cscope
  ( find arch/x86/include -name '*.h' -print; find include -name '*.h' -print;
  find xsm arch/x86 common drivers lib test -name '*.[chS]' -print ) >
  cscope.files
  cscope -k -b -q
  cscope: cannot find file arch/x86/efi/efi.h
  cscope: cannot find file arch/x86/efi/ebmalloc.c
  cscope: cannot find file arch/x86/efi/compat.c
  cscope: cannot find file arch/x86/efi/pe.c
  cscope: cannot find file arch/x86/efi/boot.c
  cscope: cannot find file arch/x86/efi/runtime.c

This is caused by these being symlinks to common/efi.  Restrict all find runes
to `-type f` to skip symlinks, because common/efi/*.c are already listed.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
xen/Makefile