From: Wolfgang Denk Date: Mon, 07 Sep 2009 14:38:22 +0200 Subject: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets In-Reply-To: <73839B4A0818E747864426270AC332C30447ECC6@zmy16exm20.fsl.freescale.net> References: <1250581042-3828-1-git-send-email-Mingkai.hu@freescale.com> <1250581042-3828-2-git-send-email-Mingkai.hu@freescale.com> <5A8C27D2-9177-4577-ADC6-4012EA088907@kernel.crashing.org> <73839B4A0818E747864426270AC332C3043F59F0@zmy16exm20.fsl.freescale.net> <20090904194248.43E2D832E8DE@gemini.denx.de> <73839B4A0818E747864426270AC332C30447ECAF@zmy16exm20.fsl.freescale.net> <20090907101822.3497D832E8DE@gemini.denx.de> <73839B4A0818E747864426270AC332C30447ECB9@zmy16exm20.fsl.freescale.net> <20090907105915.63F11832E8DE@gemini.denx.de> <73839B4A0818E747864426270AC332C30447ECC6@zmy16exm20.fsl.freescale.net> Message-ID: <20090907123822.3F0D5832E8DE@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear "Hu Mingkai-B21284", In message <73839B4A0818E747864426270AC332C30447ECC6@zmy16exm20.fsl.freescale.net> you wrote: > ... [Full quote deleted] ... > > You already know the board name, because the board config=20 > > file is clearly related ot one (or eventually more) boards.=20 > > The rest can be done with some trivial #ifdef'fery. Could you please stop full-quoting? Please see http://www.netmeister.org/news/learn2quote.html > Oh... I complicated the matters, you means as the follows, right? > > In the Makefile: > MPC8536DS_NAND_config \ > MPC8536DS_NAND_36BIT_config \ > MPC8536DS_36BIT_config \ > MPC8536DS_config: unconfig > @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h > @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale Yes, except that the "echo" line should not be needed either, as mkconfig would to that automatically for you. > then in the include/configs/*.h: > #ifdef MPC8536DS_NAND > blablabla > #endif > > #ifdef MPC8536DS_NAND_36BIT > blablabla > #endif > > #ifdef MPC8536DS_36BIT > blablabla > #endif That would be CONFIG_MPC8536DS_NAND etc., but except of that that's whaty I mean. [Eventually it might make sense to ise a common prefix for Maefile generated symbols, like CONFIG_MK_ or so.] > I'll intergate your comments, align the patchset to the latest U-Boot > and resend the patches, please comments then. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de What about WRITING it first and rationalizing it afterwords? :-) - Larry Wall in <8162@jpl-devvax.JPL.NASA.GOV>