From nobody Fri Nov 29 14:47:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1637848058; cv=none; d=zohomail.com; s=zohoarc; b=jJOYgE+sTf6f9tqiWwBEJnCWuWYhJ+dx7JWmjc4cg5lKhn5+3vQayKXE4Rf0unujMnaeAsihHDH1pgSjwPAwTIlUbv8343s3klyGsy7wz6H1XpvKvztmGgoZ/JczGJi3G94vdMDt1a6G9WEBtNigZXwot0Fc7agETcMjJKem1Yc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848058; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8WK2mt4rLBk3B8oo5w2dAlU3tehXZ0QE+xpMMB87BbQ=; b=bK67BXaQD7pkJTzD8KLVnH6SKr0EU+9zKZcR3WVBtSwoDjfz4TNDOwSLU5CLnJh9AzEVEvewQWaYLnNNAnhPFeUBjB9cJs8O4JQFOYeUWqxucwYXaWhR8XEEOKiTiP0SY2bIc4VWb1PKmKyRuh2DPM+b/PQpo4UNCNGGPqvwvvs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1637848058763740.6922285716643; Thu, 25 Nov 2021 05:47:38 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231278.400211 (Exim 4.92) (envelope-from ) id 1mqF5x-00036F-Or; Thu, 25 Nov 2021 13:47:25 +0000 Received: by outflank-mailman (output) from mailman id 231278.400211; Thu, 25 Nov 2021 13:47:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5x-00035u-Go; Thu, 25 Nov 2021 13:47:25 +0000 Received: by outflank-mailman (input) for mailman id 231278; Thu, 25 Nov 2021 13:47:23 +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 1mqF0Q-0007NX-JW for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:42 +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 6b070573-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:41 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 6b070573-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847701; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EuHi73nC8Lo2X69xXlwl/JFsLjuB22umM4hppbRP7sA=; b=N2XMfd1dxLtLCFYDFwGEjExr+Xgo9Y00OgL4rF4rbox+RlebOK1jiR0o FERt+cTmqwpCqT7CokV1/+TGk1g7B7W+n7CQrKbh87CtM3kj8KNol/fcL f8mQybmoYTjAr9O/8ZpBXuwsAy3H3224Hf4mHin4T6TKWVBF/ZbKSb/XX 0=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: a2TZ0JpCMic4LK80dwx4//vXt6zJcghg/RwWZMcGviTPCuuK9qqQM15vDv5PvYYOilRhbiKe76 kz6e9vByi8e9WGr/p/40Nsr3uNnJRAQZyYN/DeHkV6E7vF5zVEW0TYeiiF0zXF16AKKX2EE4/b XNn9xJFdSTcMR8umUhH6x9dhDqvdQAxdVXhxMW+sL0qiqtTJhCLbuU9ZBQq0XTuoiNGTkZh3Fd A1gCGdK+y7tUsGILa3Abi/hXxrb7Lwr20rbSD/g6G5sMZY1SlgdCtSEasJX/XOzWnBYQHuq/jH q3AY9dADfufEV8aPtNLT36io X-SBRS: 5.1 X-MesageID: 60634165 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:L4O2nqgwA0DFXhPOwCqqo/m7X161nRcKZh0ujC45NGQN5FlHY01je htvX2mAbvreYmT2et9yOdni9UtUvJ7WyIA1GVNvqC8wRXsb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0F0/NtTo5w7Rg29cy3IDja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1fjrn3bwcoOZfCwsQjbgRBPn9SNPVvreqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHiOp8fvXdxiynUF/88TbjIQrnQ5M8e1zA17ixLNaiGO ZFFMGQyBPjGSyRuMGcdD5k9p+ytj0X9SBh6g06vlJNitgA/yyQuieOwYbI5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3wgQ0xx1AeOZHRB0caOn1Uhwmg5qXyH gKpuQ== IronPort-HdrOrdr: A9a23:MyexUamP7sLWx0ELc7hHh1sTS2XpDfIq3DAbv31ZSRFFG/Fxl6 iV88jzsiWE7wr5OUtQ4OxoV5PgfZqxz/NICMwqTNWftWrdyQ+VxeNZjbcKqgeIc0aVygce79 YET0EXMqyXMbEQt6jHCWeDf+rIuOP3k5yVuQ== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634165" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 30/47] build: rework "headers*.chk" prerequisite in include/ Date: Thu, 25 Nov 2021 13:39:49 +0000 Message-ID: <20211125134006.1076646-31-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848060637100001 Content-Type: text/plain; charset="utf-8" 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. ( "$(srcdir)" is a shortcut for "$(srctree)/$(src)" ) 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 --- Notes: v8: - add prefix "public-" to newly introduced macros. - make use of the new "$(srcdir)" shortcut. xen/include/Makefile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index 5a2b4c9f65fa..6e80ef276fd9 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -39,8 +39,8 @@ cppflags-$(CONFIG_X86) +=3D -m32 =20 endif =20 -public-$(CONFIG_X86) :=3D $(wildcard $(src)/public/arch-x86/*.h $(src)/pub= lic/arch-x86/*/*.h) -public-$(CONFIG_ARM) :=3D $(wildcard $(src)/public/arch-arm/*.h $(src)/pub= lic/arch-arm/*/*.h) +public-$(CONFIG_X86) :=3D $(wildcard $(srcdir)/public/arch-x86/*.h $(srcdi= r)/public/arch-x86/*/*.h) +public-$(CONFIG_ARM) :=3D $(wildcard $(srcdir)/public/arch-arm/*.h $(srcdi= r)/public/arch-arm/*/*.h) =20 .PHONY: all all: $(addprefix $(obj)/,$(headers-y)) @@ -81,10 +81,21 @@ ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH)) =20 all: $(obj)/headers.chk $(obj)/headers99.chk $(obj)/headers++.chk =20 -PUBLIC_HEADERS :=3D $(filter-out $(src)/public/arch-% $(src)/public/dom0_o= ps.h, $(wildcard $(src)/public/*.h $(src)/public/*/*.h) $(public-y)) +public-hdrs-path :=3D $(srcdir)/public =20 -PUBLIC_C99_HEADERS :=3D $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h -PUBLIC_ANSI_HEADERS :=3D $(filter-out $(src)/public/%ctl.h $(src)/public/x= sm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) +public-list-headers =3D $(wildcard $1/*.h $1/*/*.h) +public-filter-headers =3D $(filter-out $(addprefix $(public-hdrs-path)/,$(= $1-filter)), $($1)) + +public-c99-headers :=3D io/9pfs.h io/pvcalls.h +public-headers :=3D $(call public-list-headers,$(public-hdrs-path)) $(publ= ic-y) +public-ansi-headers :=3D $(public-headers) + +public-headers-filter :=3D dom0_ops.h arch-% +public-ansi-headers-filter :=3D %ctl.h xsm/% %hvm/save.h $(public-headers-= filter) $(public-c99-headers) + +PUBLIC_HEADERS :=3D $(call public-filter-headers,public-headers) +PUBLIC_ANSI_HEADERS :=3D $(call public-filter-headers,public-ansi-headers) +PUBLIC_C99_HEADERS :=3D $(addprefix $(public-hdrs-path)/, $(public-c99-hea= ders)) =20 $(src)/public/io/9pfs.h-prereq :=3D string $(src)/public/io/pvcalls.h-prereq :=3D string --=20 Anthony PERARD