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

Re: [XEN PATCH v7 48/51] build: Rework "headers*.chk" prerequisite in include/


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 14 Oct 2021 11:48:56 +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=xGvy/QwWcMZ/OSmXbLZbPXm4xLrBPsrCLiFUyztBCc4=; b=e+1mV3gq1lNuBYHVwMFEa01O7+KLU7ktUzVyRBJpJiDXblwiB9OOnGt+rHCoiC6AR5R/5Hs7kYUIbMqKW1QVnpAjzLJ4DUc18Cmx2zWzZSbnoeOTOqaUsbpof3xwRpHtIXJFijU31fAKIDed3ZbC6GRAtnNlW3+ExAdioa5P1eXxP3n5pJM9CAeg7ekR5xUSDjwjbTU+nD61v3WmINpzcqKmy8dvOOrh3+pqYW0Fbu0+Dcb3vQQGHkh/zIJSnm/O31e9+zKp2Jjb+6SVc7S/Zr3O+PnroaZiNzkQ0HxphCckJTW4kpRZgOGvbC6gB12POIluiZZtVpN/QPfnsqS73g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X7qe/hBuF3Dddkv2XECbEz56I1kU9MqdMcIOM/pHHahbFDbt8GaWnWSAQ3XaMUofcBseuDWqmjdf447NG2ceKB0/YrJaJeOCkudO4uOWkbIp108QQr9uvXRAwijVQDINDndi556THe24HjRMnBTnS1g9X2xWrIp9ZyANHleFW4P5JuMIPlmJQwxOkCUUjCocgJe7HECTDpFBzXQ6Qyls5PzsOCe4wW7Jf8spaf5Jv5UTh8tiav9fDhIpqkiEyaw2mOE3AAeyC8Qm6lLdAmK7zhE3nJ+s+TUAmKD90PUe81OIJhk4QToD9Dw/+52ZuBlOAheDn5QsYIOgZu6DFQK7cg==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 14 Oct 2021 09:49:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.08.2021 12:50, Anthony PERARD wrote:
> Listing public headers when out-of-tree build are involved becomes
> more annoying where every path to every headers needs to start with
> "$(srctree)/$(src)", or $(wildcard ) will not work. This means more
> repetition.
> 
> This patch attempt to reduce the amount of duplication and make better
> use of make's meta programming capability. The filters are now listed
> in a variable and don't have to repeat the path to the headers files
> as this is added later as needed.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Sorry, just one nit here:

> --- a/xen/include/Makefile
> +++ b/xen/include/Makefile
> @@ -78,10 +78,21 @@ ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH))
>  
>  all: $(obj)/headers.chk $(obj)/headers99.chk $(obj)/headers++.chk
>  
> -PUBLIC_HEADERS := $(filter-out $(src)/public/arch-% 
> $(src)/public/dom0_ops.h, $(wildcard $(src)/public/*.h $(src)/public/*/*.h))
> +hdrs-path := $(srctree)/$(src)/public
>  
> -PUBLIC_C99_HEADERS := $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h
> -PUBLIC_ANSI_HEADERS := $(filter-out $(src)/public/%ctl.h $(src)/public/xsm/% 
> $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS))

These all had / have "PUBLIC" in their names because the makefile doesn't
live in public/. I'd prefer if you could stick to this for all the new
variables/macros you add (lower case then of course).

Jan

> +list-headers = $(wildcard $1/*.h $1/*/*.h)
> +filter-headers = $(filter-out $(addprefix $(hdrs-path)/,$($1-filter)), $($1))
> +
> +c99-headers := io/9pfs.h io/pvcalls.h
> +public-headers := $(call list-headers,$(hdrs-path))
> +ansi-headers := $(public-headers)
> +
> +public-headers-filter := dom0_ops.h arch-%
> +ansi-headers-filter := %ctl.h xsm/% %hvm/save.h $(public-headers-filter) 
> $(c99-headers)
> +
> +PUBLIC_HEADERS := $(call filter-headers,public-headers)
> +PUBLIC_ANSI_HEADERS := $(call filter-headers,ansi-headers)
> +PUBLIC_C99_HEADERS := $(addprefix $(hdrs-path)/, $(c99-headers))
>  
>  $(src)/public/io/9pfs.h-prereq := string
>  $(src)/public/io/pvcalls.h-prereq := string
> 




 


Rackspace

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