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

[PATCH v2] build: run targets cscope,tags,... using tree-wide approach


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 8 Mar 2023 11:49:27 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=rR4T2rVnujEKZRqweJsHG1eLhjrxQCnqKPb0MvKT94k=; b=k2ceXWFYbDE8P5UO4oCGA6iTyu2WBoZDlBsTYX+rEvE/AryRyMH+JqZ2XxDWx0PhJhcGP5xM+ZhGtBkldzKSmcZpk+m9P7A13v9rKiG5X5M7Lxvr6pxsOwio7OG1OlX5cvMb5SVAeBf59qZ2X8KsCc1aa0PPWzTRpeMJXosbpNXbsp3gxVHJYnKoO4xecQk1Z3Wp3FCZBk2CP1J+TD5IKvUVTNHzWp7KVAZn4jiAxkk+hdB3SXRgdoeEsK+jiWVViK4Pf1p+pZq6x7CeRcMCMvwf/V6hGgYXGGkKd4VFJpNMXiW6eShnw9o7AFk0AnujXAXICuPeYf1Jw0vM6Q4LFA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=frnlPcuhR7XV7yKljEQOkJdKoJH9ZPKEvwPOWf0R3lBt6rWOHCxnJRZvNrRaS5vrwM3DVDxbRLpnHrwvMzMx1LIE8loS8BOfDf8O9dM1/t9hBqzEmcDN6dugO2Ejndtk8eGcuMtSQ1GchPameAhsw3EeS6dMyRSR5mTiulZOy3sW10i3DudRPdxUm778RJMNn10ue1ejoxFcAhaGPdVdkROOMm2VcWca3LdfLyeChWedYzmtpq9FqiFq66KS5rVEvHoXrJkUa6DKNMoaqbDwjwazl+PXNBShNp/j+LPJ9m5HYIajWsiNJMrJham/1zZRU2Z7f+fyTY1KOjG5qplUxQ==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 08 Mar 2023 10:49:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Despite being a matter of taste, in general, there are two main approaches
when dealing with code tagging: tree-wide, where all the sources are taken
into account or config-wide, when considering Kconfig options and actually
built files. At the moment, all_sources variable is defined using SUBDIRS,
which lists all the directories except arch/, where only $(TARGET_ARCH)
is taken into account. This makes it difficult to reason about and creates
fuzzy boundaries being a blocker when considering new directories that
might be config-dependent (like crypto/ which is missing in SUBDIRS).

For now, switch to the intermediate solution to list all the directories
in SUBDIRS without exceptions (also include crypto/). This way, the
approach taken is clear allowing new directories to be listed right away
without waiting to fix the infrastructure first. In the future, we can
then add support for config-wide approach.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
Changes in v2:
 - was: [PATCH] build: add crypto/ to SUBDIRS
 - use tree-wide approach to remove ambiguities

Based on the following discussion:
https://lore.kernel.org/xen-devel/874a28ac-3ae4-a6c6-c230-570be3672441@xxxxxxxx/T/#t
---
 xen/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Makefile b/xen/Makefile
index 2d55bb9401f4..2710d7327e35 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -589,7 +589,7 @@ $(TARGET): outputmakefile FORCE
        $(Q)$(MAKE) $(build)=. arch/$(TARGET_ARCH)/include/asm/asm-offsets.h
        $(Q)$(MAKE) $(build)=. MKRELOC=$(MKRELOC) 'ALL_OBJS=$(ALL_OBJS-y)' 
'ALL_LIBS=$(ALL_LIBS-y)' $@
 
-SUBDIRS = xsm arch/$(TARGET_ARCH) common drivers lib test
+SUBDIRS = xsm arch common crypto drivers lib test
 define all_sources
     ( find include -type f -name '*.h' -print; \
       find $(SUBDIRS) -type f -name '*.[chS]' -print )
-- 
2.25.1




 


Rackspace

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