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

Mike Frysinger
2009-08-13T20:23:50Z

On Thursday 13 August 2009 16:15:11 Wolfgang Denk wrote:
> Mike Frysinger 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 ...).

i'm only giving POSIX compliant versions of proposed code. the issue you
raised i dont care about -- that's for the OP to handle.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090813/94a9ea16/attachment.pgp