From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sat, 27 Jan 2007 01:37:01 +0100 Subject: [U-Boot-Users] [PATCH] Add support for the MPC8349E-mITX-GP In-Reply-To: Your message of "Fri, 26 Jan 2007 15:49:47 CST." <45BA777B.303@freescale.com> Message-ID: <20070127003701.AEB93353AF2@atlas.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 In message <45BA777B.303@freescale.com> you wrote: > Wolfgang Denk wrote: > > In message <45BA718E.1070005@freescale.com> you wrote: > >> The patch currently does this: > >> > >> MPC8349ITX_config \ > >> MPC8349ITX_LOWBOOT_config \ > >> MPC8349ITXGP_config: unconfig > >> @mkdir -p $(obj)include > >> @mkdir -p $(obj)board/mpc8349itx > >> @CTYPE=$(subst MPC,,$(@:_config=)); \ > >> echo "#define CONFIG_MPC$${CTYPE}" >> $(obj)include/config.h > >> @if [ "$(findstring GP,$@)" ] ; then \ > >> echo "TEXT_BASE = 0xFE000000" >$(obj)board/mpc8349itx/config.tmp ; \ > >> fi > >> @if [ "$(findstring LOWBOOT,$@)" ] ; then \ > >> echo "TEXT_BASE = 0xFE000000" >$(obj)board/mpc8349itx/config.tmp ; \ > >> fi > >> @$(MKCONFIG) -a MPC8349ITX ppc mpc83xx mpc8349itx > > > > I would not reject such a patch. It looks resonable to me. [You could > > get rid of the CTYPE thingy which would save one line.] > > How else would I do this, then? > > echo "#define CONFIG_MPC$${CTYPE}" >> $(obj)include/config.h > ^^^^^^^^^ echo "#define CONFIG_$(@:_config=)" >> $(obj)include/config.h ? I mean, you define a variable which is just used once, so insert the value directly. And then, why strip the "MPC" part just to add it again? Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Some programming languages manage to absorb change, but withstand progress. -- Epigrams in Programming, ACM SIGPLAN Sept. 1982