From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B88DC433EF for ; Tue, 18 Jan 2022 11:41:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.258455.445124 (Exim 4.92) (envelope-from ) id 1n9mrP-0000ku-FH; Tue, 18 Jan 2022 11:41:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 258455.445124; Tue, 18 Jan 2022 11:41:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n9mrP-0000kn-CD; Tue, 18 Jan 2022 11:41:11 +0000 Received: by outflank-mailman (input) for mailman id 258455; Tue, 18 Jan 2022 11:41:10 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n9mrO-0000ke-1E for xen-devel@lists.xenproject.org; Tue, 18 Jan 2022 11:41:10 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 84db028f-7853-11ec-9bbc-9dff3e4ee8c5; Tue, 18 Jan 2022 12:41:06 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 84db028f-7853-11ec-9bbc-9dff3e4ee8c5 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1642506067; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Yh2q8WWVm18AcF8TwG6hB8sfVb3dSI9zWs8lOCBxGmw=; b=ZjJYbN1tf6qte23ww7vEHZllKMehvKZOi3P1647HvZHza16bHmlvlege JxLGck5lD3gdHHCLUbxrMdAJu9CeTmL902ajBmudxPFkY8tQ5piAqW37F 69FOS05Exesprh4lkpR0eQIwUgrZD4Mv9PXjSnoWsYU93ZZ94nOTc/Wie s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: hesjMCSwHbE2QiGA8GD6g8Cr5Gw7sOHzM3frikIUszfVeKvsli9qhqpLNDge0JpgOB0kV6pBy8 /UPEriuD8LECow81JLRSqONyhjrYVbKkC2mhnW2mvMzz7UW/WOyaueZH6Zmptuvq01DKM1vx+N 1BLVUk4ZFv4N9aRWpdYDVW78kqiD0elFnGjP1zmFZBmVPsmMZWIzvld9iGIlYSR5mCwX6O/XuY 0gi5IF1YWN40p5lMyhCdZtO9MLQNKW/KZpXimIcR6ObnFct9Vdh+H5uzrIoT4UFJZfAaP9qIaQ pkuU5Te4gvcP4MvjhdlOozca X-SBRS: 5.2 X-MesageID: 64345779 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:VghI4qpZDg+uwa212LMZThifWyReBmKTYhIvgKrLsJaIsI4StFCzt garIBnQOP7famKgKI8lbYqyoBhT6J/dmINmTARlqy02QihG9JuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlZT4vE2xbuKU5NTsY0idfic5Dndx4f5fs7Rh2NQw2IHpW1rlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx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W+GNJGiPWGTx8aSkR ONU0/Cjb6FXwAcU69JxSu85w7g/6t3jo65h4j5lRHibPU62Dr5AI2Wd2ZUdvKN62bIE6xC9X ViC+4cGNOzRat/lClMYOCEscv+HiaMPgjDX4Pk4fBf66Stw8ObVWEleJUDR2ilULb8zO4I52 +Yx/sUR7lXn2BYtN9+HiAFS9niNcSNcA/l26MlCDd+5kBcvx3FDfYfYW33/75y4YtlRNlUnf 22Pj63YirUAnkfPfhLfz5QWMTaxUXjWhC138Q== IronPort-HdrOrdr: A9a23:OB+0Iqu3VFTfxxSHTNlq0D9q7skDdtV00zEX/kB9WHVpmszxra 6TddAgpHvJYVcqKRQdcL+7VZVoLUmxyXcx2/h3AV7AZniFhILLFuFfBOLZqlWKcREWtNQttp uIG5IObuEYZmIasS+V2maFL+o= X-IronPort-AV: E=Sophos;i="5.88,297,1635220800"; d="scan'208";a="64345779" Date: Tue, 18 Jan 2022 11:41:01 +0000 From: Anthony PERARD To: Jan Beulich CC: Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Subject: Re: [XEN PATCH v8 30/47] build: rework "headers*.chk" prerequisite in include/ Message-ID: References: <20211125134006.1076646-1-anthony.perard@citrix.com> <20211125134006.1076646-31-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: On Tue, Dec 21, 2021 at 03:07:52PM +0100, Jan Beulich wrote: > On 25.11.2021 14:39, Anthony PERARD wrote: > > @@ -81,10 +81,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) $(public-y)) > > +public-hdrs-path := $(srcdir)/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)) > > +public-list-headers = $(wildcard $1/*.h $1/*/*.h) > > +public-filter-headers = $(filter-out $(addprefix $(public-hdrs-path)/,$($1-filter)), $($1)) > > + > > +public-c99-headers := io/9pfs.h io/pvcalls.h > > +public-headers := $(call public-list-headers,$(public-hdrs-path)) $(public-y) > > +public-ansi-headers := $(public-headers) > > Personally I find it odd for public-c99-headers to be first in this group. > Further down, in the upper-case counterparts, you have it at the end (still > in context below). > > > +public-headers-filter := dom0_ops.h arch-% > > What is the criteria to be listed here vs ... > > > +public-ansi-headers-filter := %ctl.h xsm/% %hvm/save.h $(public-headers-filter) $(public-c99-headers) > > ... outside of that macro's expansion here? There's no other use of the > macro that I can spot, so its presence is puzzling me. The "%-filter" macro are used by the macro "public-filter-headers", which takes "$(%)" and filter-out "$(%-filter)". Currently, PUBLIC_ANSI_HEADERS is PUBLIC_HEADERS with headers filtered-out. And PUBLIC_HEADERS is public-y with headers filtered-out. In my patch, I derive PUBLIC_ANSI_HEADERS from public-y, so I also need to use the filter used to generate PUBLIC_HEADERS. So $(public-headers-filter) is both used on its own and in the ansi-filter. > > +PUBLIC_HEADERS := $(call public-filter-headers,public-headers) > > +PUBLIC_ANSI_HEADERS := $(call public-filter-headers,public-ansi-headers) > > +PUBLIC_C99_HEADERS := $(addprefix $(public-hdrs-path)/, $(public-c99-headers)) > > While benign right now, wouldn't it be more consistent if > public-filter-headers was also applied in this last case? Or is > there a reason not to? It wouldn't work at the moment because $(public-c99-headers) aren't prefix with "$(public-hdrs-path)" like $(public-headers). This is because I'm using $(public-c99-headers) in $(public-ansi-headers-filter). Maybe I should just had the prefix to the c99-headers and removing the prefix when using it in the filter, something like that: public-c99-headers := $(addprefix $(public-hdrs-path)/,io/9pfs.h io/pvcalls.h) public-ansi-headers-filter := %ctl.h xsm/% %hvm/save.h $(public-headers-filter) \ $(patsubst $(public-hdrs-path)/%,%,$(public-c99-headers)) then I thin that would work: PUBLIC_C99_HEADERS := $(call public-filter-headers,public-c99-headers) I could put an empty "public-c99-headers-filter :=" somewhere, just in case one is looking for it later. Thanks, -- Anthony PERARD