lkml.org 
[lkml]   [2018]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subject[RFC PATCH 0/5] kbuild: build modules from code in multiple directories.
This set of patches makes it possible to build a module from
code in multiple directories without needing to list files from one
directory in the Makefile of another directory.

The code was developed for lustre (which is now out-of-tree :-( ) but
can be useful elsewhere, such as for xfs and btrfs and others.

In fs/xfs/Makefile the section:

xfs-y += $(addprefix libxfs/, \
xfs_ag.o \
xfs_alloc.o \
.....

could become

xfs-y += libxfs/

and then in fs/xfs/libxfs/Makefile we would have

modobj-$(CONFIG_XFS_FS) += xfs_ag.o \
xfs_alloc.o \
.....

A similar process could move filenames for scrub/* from the
fs/xfs/Makefile to fs/xfs/scrub/Makefile

Apart from improving modularity, this means that partial makes such
as:

make fs/xfs/libxfs/

or

make fs/xfs/scrub/attr.s

can work.

Comments and review most welcome.

Thanks,
NeilBrown

---

NeilBrown (5):
kbuild: detect directories in components of a module.
kbuild: treat a directory listed in a composite object as foo/mod.a
kbuild: support building of per-directory mod.a
kbuild: disable KBUILD_MODNAME when building for mod.a
kbuild: Add documentation for modobj-m


Documentation/kbuild/makefiles.txt | 65 ++++++++++++++++++++++++++++++++++--
scripts/Makefile.build | 57 ++++++++++++++++++++++----------
scripts/Makefile.lib | 63 ++++++++++++++++++++++-------------
3 files changed, 141 insertions(+), 44 deletions(-)

--
Signature

\
 
 \ /
  Last update: 2018-06-18 06:57    [W:0.112 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site