[BusyBox] config.h/bb_config.h translation broken

Rob Landley rob at landley.net
Tue Aug 2 05:40:17 UTC 2005


On Monday 01 August 2005 10:34, Paul Fox wrote:
> i think inserting newlines with sed can be hard to do
> portably, this two-pass approach works:

I tested busybox sed and gnu sed, but of course who has any idea what Solaris 
and such will do.  :(

What sed are you using, anyway?

> include/bb_config.h: include/config.h
>         echo "#ifndef AUTOCONF_INCLUDED" > $@
>         sed -e 's/#undef CONFIG_\(.*\)/#define ENABLE_\1 0/' < $< >> $@
>         sed -n -e 's/#define CONFIG_/#define ENABLE_/p' < $< >> $@
>         echo "#endif" >> $@
>
> but all of the "ENABLE_XXX 1" lines end up at the bottom of the file.
>
> i won't commit this -- someone probably has a better idea.

I haven't got any major objection to this...

Rob



More information about the busybox mailing list