On Thu, 18 Apr 2002 23:18:08 -0500,
Dean Roehrich <roehrich@xxxxxxx> wrote:
>>dep_tristate enforces CONFIG_XFS_FS=m -> CONFIG_XFS_DMAPI=[mn]
>
>Ah, but apparently it doesn't enforce the other way. XFS=y -> DMAPI=[yn].
>Why would that be?
Designed that way. The kernel config assumes a hierarchy of code, with
the base code being selected first and options later, with the optional
code calling the base, not the other way around. Then the base code
can be built in and the optional code can be a module, so BASE=y with
OPTIONAL=m is assumed to be valid. XFS/DMAPI is awkward because the
base XFS code calls the optional DMAPI code directly, breaking the
assumptions of dep_tristate.
If you want the optional code to be a module when the base code is
built in then direct function calls from base to optional are out.
Instead the base code has to call the optional code via a function
pointer and check if that pointer is filled in before using it.
|