Pushing toybox infrastructure upstream.
Ralf Friedl
Ralf.Friedl at online.de
Mon Mar 15 09:43:56 UTC 2010
Rob Landley wrote:
> The globals handling is _almost_ right. I need to make the #define TT toybox
> currently has go away, probably some kind of:
>
> #define THIS wc
> #include "busybox.h"
>
> And use that #define internally to do behind the scenes magic. (This might
> also be able to make the autogenerated FLAG stuff work. I need to study the
> c99 preprocessor spec to see what I've got to work with, but that can come
> later...)
Instead of this, it is better to do:
#include "generated/wc.h"
Then the generated wc.h can contain whatever is necessary for flags,
globals, and so on, and include busybox.h for the common stuff.
If you place everything in one big include file, with preprocessor
conditions on the definition of THIS, you will trigger a recompile of
all files whenever you change a single file.
Ralf
More information about the busybox
mailing list