From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Mon, 26 May 2008 08:06:36 -0700 Subject: [U-Boot-Users] [PATCH] Move conditional compilation of MPC8XXX SPI driver to Makefile In-Reply-To: <20080526075453.50C9F2430A@gemini.denx.de> References: <20080526075453.50C9F2430A@gemini.denx.de> Message-ID: <483AD1FC.7040805@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Dear Ben, > > in message <1211783488-30985-1-git-send-email-biggerbadderben@gmail.com> you wrote: > >> diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile >> > ... > >> -COBJS-y += mpc8xxx_spi.o >> +COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o >> > > i. e. we move CONFIG_MPC8XXX_SPI into the Makefile... > > >> diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c >> > ... > >> -#if defined(CONFIG_MPC8XXX_SPI) && defined(CONFIG_HARD_SPI) >> > > ...but that would leave the "#ifded CONFIG_HARD_SPI" part still in > place. Or am I missing something? > If CONFIG_MPC8XXX_SPI is defined but CONFIG_HARD_SPI is not, compilation will fail, since CONFIG_HARD_SPI activates the common SPI code on PowerPC. I guess I figured Kconfig would eventually manage the dependencies of these options, but I will put the #ifdef back in if you want. regards, Ben