All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] kbuild: build modules from code in multiple directories.
@ 2018-06-18  4:55 NeilBrown
  2018-06-18  4:55 ` [PATCH 4/5] kbuild: disable KBUILD_MODNAME when building for mod.a NeilBrown
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: NeilBrown @ 2018-06-18  4:55 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek; +Cc: linux-kernel, linux-kbuild

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


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

end of thread, other threads:[~2018-07-05 23:03 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-18  4:55 [RFC PATCH 0/5] kbuild: build modules from code in multiple directories NeilBrown
2018-06-18  4:55 ` [PATCH 4/5] kbuild: disable KBUILD_MODNAME when building for mod.a NeilBrown
2018-06-27  5:52   ` Masahiro Yamada
2018-07-03 22:14     ` NeilBrown
2018-07-04 12:08       ` Masahiro Yamada
2018-07-04 21:54         ` NeilBrown
2018-07-05  9:06           ` Masahiro Yamada
2018-07-05 23:03             ` NeilBrown
2018-06-18  4:55 ` [PATCH 3/5] kbuild: support building of per-directory mod.a NeilBrown
2018-06-19  3:57   ` [PATCH 3/5 - v2] " NeilBrown
2018-06-18  4:55 ` [PATCH 1/5] kbuild: detect directories in components of a module NeilBrown
2018-06-18  4:55 ` [PATCH 2/5] kbuild: treat a directory listed in a composite object as foo/mod.a NeilBrown
2018-06-18  9:14   ` kbuild test robot
2018-06-18 22:30     ` NeilBrown
2018-06-18 22:30       ` NeilBrown
2018-06-18  4:55 ` [PATCH 5/5] kbuild: Add documentation for modobj-m NeilBrown
2018-06-18  8:20 ` [RFC PATCH 0/5] kbuild: build modules from code in multiple directories Christoph Hellwig
2018-06-19  4:05   ` NeilBrown
2018-06-19  4:47     ` Christoph Hellwig
2018-06-19  5:03       ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.