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

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


  • To: Andrew Cooper <amc96@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 16 Dec 2021 16:15:18 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=bubbYSp+rLrksIJwv3J3gi332AdAKd0RX6X9fxKhp/g=; b=A2En2iVklL8kj6jVG13NEaK+lOUqYPpu/nNOXnjNlhH5k9VBHSoaXO85A65/IbY0bqwg/hdvon5oR6iqTfmMKsU1YTUrrcn5OawLfY+RXELhKLedU63/Yvuj/BF60BnbWv7Vgwv6vR/c+75azlitMJFch8KHdNCDzuXRxZhXmGkZ6Mx17eUr85qM/QEF9CBNj4iWK/Dm68tBzun5v+gGcUL6dbrFzgC+3qf3k4OYmlmfXBKu8QIx/cznRMe0jAN/kNG34wruUGl4fMuaWFqJrCbL9uSfkMIxGkjpyQCizvHZz0f58IUdIthP6ccg22dnz1wWW8qH1fSGJ27so6eP9A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J4AJq1AYTfxuwKXC3AEB2RAkgrDVytfVqM9aZl3oiGnGyQE6qNmJis1eoDTk3lqZIkmvCyRPCCIV55xdSh39P7wdN39ty0ipBV+yO5HO654XSSa6hnKE/Qprr94cKEyBnAsaXj9gM25dAqk3ictOfVn1iRsvcqxe0NVb/nHn/9X3jyNQcJP1UCo+2aKKCDy7sHJolMKcjBJ7MlzOvQAVgpo62nhG02Ejn7E1wDcOsit9CxD4RL1HxCvDqm16nfff7b+Kx+Y+H0kRk4+OXqmX82OdkAgSE4DwcOQZFLyLl47SUfZIJOAIlgBHyY5njlUprVGlNofxQapFVPonD5IAMw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 16 Dec 2021 15:15:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.12.2021 15:58, Andrew Cooper wrote:
> On 16/12/2021 14:00, Jan Beulich wrote:
>> On 16.12.2021 10:20, Andrew Cooper wrote:
>>> 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.
>> I have reservations here, albeit of theoretical nature as long as only
>> the csope target is affected (simply because I don't use it): Make
>> rules should really be independent of a dir entry being a real file or
>> a symlink. I did run into problems with that already years ago when
>> the shim was introduced. My arrangements heavily use symlinking, and
>> any assumption on files being "real" ones will break this. At the very
>> least symlink checks should be restricted to cover only relative ones;
>> ideally one would distinguish ones staying within the tree vs ones
>> reaching to the "outside".
> 
> all_sources is used exclusively for "tags" purposes; the
> TAGS/tags/gtags/cscope targets.
> 
> Personally, I'd prefer there to not be symlinks in the first place.  The
> EFI logic is unnecessarily complicated to navigate.
> 
> But the reality is that inter-xen/ symlinks for source files are also a
> duplication as far as these `find` runes are concerned.

DYM intra-xen/ symlinks? Else I'm afraid I'm not following.

> Apparently tags et al will follow symlinks, while there's no obviously
> help online about cscope, other than "resolve your symlinks first".
> 
> In either case, you don't want to end up with both the regular path, and
> the symlink, ending up in the file list.
> 
> 
> I don't anticipate the usecase for all_source changing, nor the way we
> symlink things, so I think sticking with `-type f` is the appropriate
> action.

Well, as said - I disagree, but as long as only targets I don't care
about are affected, I guess I'll let you do what you want done.

> Furthermore, you really don't want a directory (e.g. include/foo.d )
> getting into the file list either.

I certainly agree with you here.

Jan




 


Rackspace

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