Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jun Sun <jsun@mvista.com>
To: Keith Owens <kaos@ocs.com.au>
Cc: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>,
	linux-mips@linux-mips.org, jsun@mvista.com
Subject: Re: IDE module problem
Date: Mon, 16 Dec 2002 18:20:50 -0800	[thread overview]
Message-ID: <20021216182050.D11575@mvista.com> (raw)
In-Reply-To: <25550.1039661797@kao2.melbourne.sgi.com>; from kaos@ocs.com.au on Thu, Dec 12, 2002 at 01:56:37PM +1100

[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]

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 #2: 021216-ide-module-obj.patch --]
[-- Type: text/plain, Size: 926 bytes --]

diff -Nru linux/arch/mips/lib/Makefile.orig linux/arch/mips/lib/Makefile
--- linux/arch/mips/lib/Makefile.orig	Sat Sep 28 15:28:38 2002
+++ linux/arch/mips/lib/Makefile	Mon Dec 16 18:13:43 2002
@@ -18,7 +18,7 @@
 endif
 
 obj-$(CONFIG_BLK_DEV_FD)	+= floppy-no.o floppy-std.o
-obj-$(CONFIG_IDE)		+= ide-std.o ide-no.o
+obj-$(subst m,y,$(CONFIG_IDE))	+= ide-std.o ide-no.o
 obj-$(CONFIG_PC_KEYB)		+= kbd-std.o kbd-no.o
 
 include $(TOPDIR)/Rules.make
diff -Nru linux/arch/mips64/lib/Makefile.orig linux/arch/mips64/lib/Makefile
--- linux/arch/mips64/lib/Makefile.orig	Sat Sep 28 15:28:38 2002
+++ linux/arch/mips64/lib/Makefile	Mon Dec 16 18:17:20 2002
@@ -11,7 +11,7 @@
 	  strnlen_user.o watch.o
 
 obj-$(CONFIG_BLK_DEV_FD)	+= floppy-no.o floppy-std.o
-obj-$(CONFIG_IDE)		+= ide-std.o ide-no.o
+obj-$(subst m,y,$(CONFIG_IDE))	+= ide-std.o ide-no.o
 obj-$(CONFIG_PC_KEYB)		+= kbd-std.o kbd-no.o
 
 include $(TOPDIR)/Rules.make

  reply	other threads:[~2002-12-17  2:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-09 19:58 IDE module problem Jun Sun
2002-12-11 13:21 ` Maciej W. Rozycki
2002-12-11 16:49   ` Jun Sun
2002-12-11 17:20     ` Maciej W. Rozycki
2002-12-12  2:56       ` Keith Owens
2002-12-17  2:20         ` Jun Sun [this message]
2002-12-17  2:25           ` Keith Owens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021216182050.D11575@mvista.com \
    --to=jsun@mvista.com \
    --cc=kaos@ocs.com.au \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@ds2.pg.gda.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox