Xen-Devel Archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] build: run targets cscope,tags,... using tree-wide approach
@ 2023-03-08 10:49 Michal Orzel
  2023-03-08 11:10 ` Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Orzel @ 2023-03-08 10:49 UTC (permalink / raw
  To: xen-devel
  Cc: Michal Orzel, Andrew Cooper, George Dunlap, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu

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@amd.com>
---
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@suse.com/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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] build: run targets cscope,tags,... using tree-wide approach
  2023-03-08 10:49 [PATCH v2] build: run targets cscope,tags,... using tree-wide approach Michal Orzel
@ 2023-03-08 11:10 ` Jan Beulich
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2023-03-08 11:10 UTC (permalink / raw
  To: Michal Orzel
  Cc: Andrew Cooper, George Dunlap, Julien Grall, Stefano Stabellini,
	Wei Liu, xen-devel

On 08.03.2023 11:49, Michal Orzel wrote:
> 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@amd.com>

Acked-by: Jan Beulich <jbeulich@suse.com>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-08 11:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08 10:49 [PATCH v2] build: run targets cscope,tags,... using tree-wide approach Michal Orzel
2023-03-08 11:10 ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).