[U-Boot] [PATCH] Add support to mkconfig for setting simple #defines in config.h

Wolfgang Denk
2009-08-13T20:15:11Z

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.