From: Wolfgang Denk Date: Fri, 04 Sep 2009 21:42:48 +0200 Subject: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets In-Reply-To: <73839B4A0818E747864426270AC332C3043F59F0@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> Message-ID: <20090904194248.43E2D832E8DE@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", sorry for the late reply [I have to admit that I kind of loist track where we are with this discussion - too many diverging statements found]. In message <73839B4A0818E747864426270AC332C3043F59F0@zmy16exm20.fsl.freescale.net> you wrote: > > How do you think of this method? Or can we handle the different options > as follows? > > MPC8536DS_NAND_config: unconfig > @echo "" >$(obj)include/config.h; > @echo "#define CONFIG_$(subst MPC8536DS_,,$(subst > config,U_BOOT,$@))" \ > > $(obj)include/config.h > @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale > @echo "CONFIG_$(subst MPC8536DS_,,$(subst config,U_BOOT,$@)) = > y" > \ > >> $(obj)include/config.mk > > If there's an orthogonal option, such as 36BIT, we have to handle it > seperately: > > MPC8536DS_NAND_config \ > MPC8536DS_NAND_36BIT_config: unconfig > @echo "" >$(obj)include/config.h; > @if [ "$(findstring _36BIT_,$@" ] ; then \ > echo "#define CONFIG_PHYS_64BIT" >>$(obj)include/config.h > ; \ > fi > @echo "#define CONFIG_$(subst MPC8536DS_,,$(subst > config,U_BOOT,$@))" \ > > $(obj)include/config.h > @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale > @echo "CONFIG_$(subst MPC8536DS_,,$(subst config,U_BOOT,$@)) = y" > \ > >> $(obj)include/config.mk I don't like either of these. It should be enough to pass the make target name to the mkconfig script resp. the board config file, i. e. in this case either "CONFIG_MPC8536DS_NAND" or "CONFIG_MPC8536DS_NAND_36BIT". The rest of the scripting/decision making can then be done in the board config file. If you want to avoid conflicts, feel free to chose a distict prefix, say CONFIG_MK_* or CONFIG_MAKE_* or so. 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 To get something done, a committee should consist of no more than three men, two of them absent.