Eric W. Biederman wrote: > Tyson D Sawyer <[EMAIL PROTECTED]> writes: > > >>Eric W. Biederman wrote: >> > >>>We can put the conditionals at the makefile level instead of at the >>>#ifdef level. The file level is usually cleaner. The problem >>>is mostly we are doing a gradual conversion and we forget the issue of >>>needing to make certain the variable is set to a non-null value. >>>Eric >>> >>> >> >>but you can do ifdef in Makefiles: >> > > Right, doh. It does make it some easier to have a clear boolean value. > The place where it really matters is in linker scripts. Where everything must > have a value. > > I know I have a working linker script that does if (DEFINED(FOO)). But to > appear in a linker script a variable must have a valid numeric value. > > For most cases I can not see any clear technical reason for doing it. > Though I have thought there was one. But from the practical point of > view it is harder to get confused if you have a clear bootlean value.
"bootlean value" - The value of having a lean boot system? ;-) > Especially if you compute one value from another. > > And at this point the change has been made... Fair enough. ...just wanted to understand it. :-) One advantage I can see is that you don't have to special case the directive to 'undef' a variable. It is always the form "define variable value" never "undef variable". Cheers! Ty -- Tyson D Sawyer iRobot Corporation Senior Systems Engineer Military Systems Division [EMAIL PROTECTED] Robots for the Real World 603-532-6900 ext 206 http://www.irobot.com
