[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/build: Fix `make cscope` rune


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Thu, 16 Dec 2021 17:23:54 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AuI2KGAqDErX4MmrWfJBNYCP34DijAEa7Ex8WTqHu8w=; b=eYvBth8zQa8HqWIRQfjMkYEyRPIIcfe1Ih0RJHteKbnlzKJLP/u/Lh0iTmDBdynZRdNJbqLGAVDUq1nc72ZwW+vysK75HHQ1C6QfUQuvK4CI4mXWoZKTXNrC25Y10DKiFKumMhSkUhpDDDAnfs3hc11FMf3JwR+p0kXS1ox0o8IGriCM9x/0OIoJy5VOiMONjeJybQykhO5Ih+sKPTbX7qPmGJj2YZjM0Eg7tPo91PSV1I1+k2zRw+Pb5Zj+gmQ3azMj5uFc47x50eNOl02KH6Oidr9DjIJ3vltj4CFef/vJxPjMAEp3zhdbNB1Hzsmq1D6bMtM9fZZJoUj+IBGiVA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=COMXH+sHUPrDxXWJol9l5ENFBPLyvGN5YlGkZxxmDygOj0pQ2bzMbCrvr9ckJAuGamchxZC9AUDy6H5d5uZZ5/0/ycJ4iE9W4DlXitIv9gY0ok6eVUzbHz20AACt3iNtArG0tXkw4ebU6klDVcskS+W+oBD8OGqFt7IXNjJuquHHuSzZ6G+rKYo2JOZ0ekSjKPBRLsW3YXIgLNKtkycV/KkzBA3aMF2v9OH7nFB66E0kjndVrb5A0qeO/zhPToKjlANs2kp+DNBfQACOubkHOxWdIyLbdzKRj6C0NgHhIO2aEeRNOnZgXjHQ3yUXHJ9p5qPTW9FlJzKW9fX549ikEg==
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Delivery-date: Thu, 16 Dec 2021 17:24:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHX8l40WACp9tX7JUSJrSNPlqLfbaw1WHYA
  • Thread-topic: [PATCH] xen/build: Fix `make cscope` rune

Hi Andrew,

Andrew Cooper <andrew.cooper3@xxxxxxxxxx> writes:

> There are two problems, both in the all_sources definition.

As a cscope user I want to thank you for the fix.

>
> 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@xxxxxxxxxx>

Reviewed-by: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>

> ---
> CC: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> CC: Julien Grall <julien@xxxxxxx>
> CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
> CC: Bertrand Marquis <bertrand.marquis@xxxxxxx>
>
> Anthony: I looked through the remainder of your build series and I cant spot
> any edits to all_sources.  Apologies if I missed it.
> ---
>  xen/Makefile | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/xen/Makefile b/xen/Makefile
> index 2ad7da7ad67b..dc6bdc44c7a2 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -468,9 +468,8 @@ arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: 
> asm-offsets.s
>  
>  SUBDIRS = xsm arch/$(TARGET_ARCH) common drivers lib test
>  define all_sources
> -    ( find arch/$(TARGET_ARCH)/include -name '*.h' -print; \
> -      find include -name '*.h' -print; \
> -      find $(SUBDIRS) -name '*.[chS]' -print )
> +    ( find include -type f -name '*.h' -print; \
> +      find $(SUBDIRS) -type f -name '*.[chS]' -print )

In my tooling I'm using -printf "\"%p\"\n" because generally there might
be files with funny names.

>  endef
>  
>  define set_exuberant_flags


-- 
Volodymyr Babchuk at EPAM

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.