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

Re: [PATCH v2 1/2] build: don't export building_out_of_srctree


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 4 May 2023 16:58:12 +0200
  • 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=pHns2eARKQnQVqrbuS0ItzjVrOdmKr1yaovuxzQ1684=; b=Ud6SN4gJCs+qN0TSG9SASeoalEyOMIbV7EWODlluUUAyOId0IfvlZWWJhkrN36zcjgRxLxMwvYQo6EeMCKX27sNg+Bft1t1I0h3RnA3loJUoG/W9InjqodGCxv46edieoITC0RhQMhDMGDaYWidcgfLPmylFjY+V01/JQSi0psaAOb+cnlIvfOGXqpIHZZU+aJjJw20LaroqJTCuZfcjkiNnGPs/mxsK7CcdFrkGuAootlGE7t1lJwCQFElpT+2J5lWINgEVwVcZ2nTjeg4tKUypwygYcPhSOyleAYBtdigRReK6i5odsn6Vg3u/kTFlwjXFHIPukj3vOMc9lZI3VQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ip5WEMsvhoegzjaaoFKKD8bBekZoUcujBWmMfQy1g+ZHqJ5wxYqT3KJMJldbM/1l+rN59S1IiGNEAJiyce19IWLxozfm8chAxaZSc2luUScLX4mf19vKgf1gh1h97ZycW9Cn6WdDmVCcQ/+GYGQohCSy6Vl8p00Rl2Wy+MEzDGz0vDhJw+Hcyy4UM6i1asqgs+SWAKiVFeuvYRvbwPJ1lGgM3PflwvJPw3W5AnUeR0sWQpfSRpNqFIYcU/XIWVFzzqWUGhNnr47WS0uBzDnOI6LIzGjIffhGSippAnSm1VarCqwsQvcuC+T5E9isGBmWIhkGYb5P6RqvI23FTK0N1w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 04 May 2023 14:58:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04.05.2023 16:49, Anthony PERARD wrote:
> On Wed, Mar 29, 2023 at 12:22:16PM +0200, Jan Beulich wrote:
>> I don't view a variable of this name as suitable for exporting, the more
> 
> We could rename it.
> 
>> that it carries entirely redundant information. The reasons for its
> 
> The patch replace building_out_of_srctree with abs_objtree and
> abs_srctree which also carries redundant informations. abs_objtree can
> probably be replaced by $(CURDIR), abs_srctree can be
> recalculated from $(srctree).
> 
>> introduction in Linux commit 051f278e9d81 ("kbuild: replace
>> KBUILD_SRCTREE with boolean building_out_of_srctree") also don't apply
>> to us. Ditch exporting of the variable, replacing uses suitably.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> This patch feels like obfuscation of the intended test. Instead of
> reading a test for "out_of_tree", we now have to guess why the two paths
> are been compared.

Hmm, it's quite the other way around for me: I view the variable as
obfuscating, as it hides what it actually expresses (or better based
on what properties it is actually set).

> Anyway, there isn't that many use outside of the main Makefile, so I
> guess the patch is kind of ok:
> Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks.

>> For further reasons (besides the similar redundancy aspect) exporting
>> VPATH looks also suspicious: Its name being all uppercase makes it a
>> "non application private" variable, i.e. it or its (pre-existing) value
>> may have a purpose/use elsewhere. And exporting it looks to be easily
> 
> This sounds like you don't know what VPATH is for, but I'm pretty sure
> you do. If there's an pre-existing value, we just ignore it. If VPATH is
> used by a program that our Makefile used and that program is intended to
> be used by build system then that a bug in that program for not knowing
> about makes' VPATH. So I don't think we need to worried about it been
> exported.

We may use programs from our build system which aren't aware they might
be used that way. No matter that I know what VPATH is for, I consider
its name to violate the shell spec.

>> avoidable: Instead of setting it in xen/Makefile, it looks like it could
>> be set in xen/scripts/Kbuild.include. Thoughts?
> 
> I'd rather not make that change unless there's a real issue with
> exporting VPATH. We are more likely to introduce a bug than to avoid
> one.

Well, okay, it's surely (hopefully) a highly theoretical consideration
anyway.

Jan



 


Rackspace

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