mount -a remounts tmpfs entries: bug or feature?

Cathey, Jim jcathey at ciena.com
Wed Dec 10 20:16:33 UTC 2008


>The big advantage of if (FOO) instead of #if FOO is that you always
>get to compile test all configurations (even if the code it later
>eliminated by the compiled).
>
>That's a pretty big deal as the number of configuration settings go
>up.

I can see how this would be.  I wonder if an appropriate solution
would be to have, as part of the makefile system and associated
with a usage convention, a manifold test target wherein the #if's
were sed-ed into a run-time if() for a test (but thrown away)
compilation?  Something like:

#.*if (.*) -> if (&1) {
$.*else    -> } else {
#.*endif   -> }

You don't care about the generated code then, or worry about the
compiler's ability to correctly thread through the && and ||'s,
you just rely on its ability to parse through all the branches
in one pass.  That would get you most of it, the low-hanging fruit
of feature conflicts and oversights.  This test compilation need
only be part of the publication phase of each new release, though
of course anybody who wanted to could run it.

You'd want some kind of convention so that #if's that _were_ to
do with system-level optioning rather than feature-set inclusion
weren't included.  (That VMS/DoS example I used before.)  I don't
know what this would mean to BB.  Something to think about.

-- Jim







More information about the busybox mailing list