From: Wolfgang Denk Date: Thu, 13 Aug 2009 22:15:11 +0200 Subject: [U-Boot] [PATCH] Add support to mkconfig for setting simple #defines in config.h In-Reply-To: <200908131602.20315.vapier@gentoo.org> References: <1249653783-16727-1-git-send-email-galak@kernel.crashing.org> <200908131426.22433.vapier@gentoo.org> <4A845DB5.1050700@freescale.com> <200908131602.20315.vapier@gentoo.org> Message-ID: <20090813201511.D439E833DBD2@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 Mike Frysinger, In message <200908131602.20315.vapier@gentoo.org> you wrote: > > > Consider a target such as BOARDNAME_66MHz_NANDBOOT_PCISLAVE. > > > > It could then invoke "$(MKCONFIG) -D $@ -a configname arch cpu board". > > mkconfig would break up the -D argument into: > > > > #define CONFIG_BOARDNAME > > #define CONFIG_66MHz > > #define CONFIG_NANDBOOT > > #define CONFIG_PCISLAVE > > then yes, a sed would have to be used. maybe something like: > DEFINES="`echo "_$*" | sed 's:_:\n#define CONFIG_:g'`${DEFINES}" ; shift > ;; Nope, this doesn't work. We have many names with more than one underscore in it (all the CONFIG_CMD_* and CONFIG_SYS_* and CONFIG_BOOTP_* and ...). 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 Chapter 1 -- The story so far: In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.