linux-mips
[Top] [All Lists]

Re: IDE module problem

To: Keith Owens <kaos@ocs.com.au>
Subject: Re: IDE module problem
From: Jun Sun <jsun@mvista.com>
Date: Mon, 16 Dec 2002 18:20:50 -0800
Cc: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>, linux-mips@linux-mips.org, jsun@mvista.com
In-reply-to: <25550.1039661797@kao2.melbourne.sgi.com>; from kaos@ocs.com.au on Thu, Dec 12, 2002 at 01:56:37PM +1100
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.GSO.3.96.1021211181032.22157L-100000@delta.ds2.pg.gda.pl> <25550.1039661797@kao2.melbourne.sgi.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5i
On Thu, Dec 12, 2002 at 01:56:37PM +1100, Keith Owens wrote:
> On Wed, 11 Dec 2002 18:20:30 +0100 (MET), 
> "Maciej W. Rozycki" <macro@ds2.pg.gda.pl> wrote:
> >On Wed, 11 Dec 2002, Jun Sun wrote:
> >
> >> > > This is because arch/mips/lib/Makefile says:
> >> > > 
> >> > > obj-$(CONFIG_IDE)               += ide-std.o ide-no.o
> >> > [...]
> >> > > 3) use some smart trick in Makefile so that we include those
> >> > > two files only if CONFIG_IDE is 'y' or 'm'.  (How?)
> >> > 
> >> >  obj-$(CONFIG_IDE_MODULE)
> >> 
> >> This does not work.  Apparently, CONFIG_IDE_MODULE is not created 
> >> for makefile part.
> >
> > Indeed -- my fault.  Variables such as $(CONFIG_IDE) are four-state and
> >for the module case they are simply set to "m".  But then you can use
> >"ifeq ($(CONFIG_IDE),m)".  Another approach is to invent an additional
> >variable automatically set to "y" whenever CONFIG_IDE is enabled. 
> 
> obj-$(subst m,y,$(CONFIG_IDE)) += ide-std.o ide-no.o
> 
> ide-std.o ide-no.o are built in if CONFIG_IDE is m or y.
> 

This is the most clean solution so far.  Anybody would object
this change?

See the attached patch.

Jun

Attachment: 021216-ide-module-obj.patch
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>