On Wed, Jan 21, 2004 at 12:13:06PM +0530, Hariprasad Nellitheertha wrote:
> The problem with this is that the target is not built when we build LKCD
> as a module, as CONFIG_CRASH_DUMP is set to "m". I read the kbuild 
> documentation and there does not seem to be anything equivalent to 
> extra-y when it comes to modules.
> 
> In order to overcome the problem, I used an ifdef-endif wrapper as below.
> 
> ifdef CONFIG_CRASH_DUMP
> extra-y                  := kerntypes.o
> endif

Two type of solutions exits.
You can always define a symbol in your Kconfig file with the bool type
and use that in the Makefile.

So it looks like:
extra-$(CONFIG_KERN_TYPES)      += kerntypes.o

Note: I prefer '+=', which allow you to just add an extra line
anywhere in the file.

The second type of solution is simply to replace the m with an y.
Several syntaxes are supported:
extra-$(patsubst,m,y,$(CONFIG_CRASH_DUMP))      += kerntypes.o
extra-$(subst,m,y,$(CONFIG_CRASH_DUMP))         += kerntypes.o
extra-$(CONFIG_CRASH_DUMP:m=y)                  += kerntypes.o

The first one is the most widely used construction. So if you
go for solution 2, then use patsubst.

        Sam


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to