Stuart Ballard <[EMAIL PROTECTED]> writes:
> Brian Jones wrote:
> >
> > I have thought of one problem however. It might be more useful to
> > break down debugging into at least package specific flags as opposed
> > to turning on debugging for the entire world with this one flag... and
> > I'd like a better name than GCJDEBUG... ideas?
>
> Suggestion:
>
> Create a bunch of classes in the gnu.java.debug package called DebugFoo
> (where Foo is the particular thing to be debugged). Each of these
> classes has a single public static final boolean ON.
>
> In the configure process, provide a way to specify which values of "Foo"
> should be debugged (eg --with-debug=Foo,Bar) and set ON to true or false
> based on whether Foo is in the list passed to with-debug.
>
> Each file can then import gnu.java.debug.* and then use "if
> (DebugFoo.ON)" to perform debugging.
I think I'd rather keep it to one java class and just use multiple
public final static variables.
Configure works like a shell script. We have to define variables by
name and set them equal to true or false. Then we have to use
AC_SUBST(VARIABLE_NAME). I can't think of a way to do this
generically at the moment. I don't think I've ever seen an example of
such either.
So can you do the following in configure?
VAR="true"
AC_SUBST(VAR)
where VAR is defined as a variable... ie $foo.
$foo="true"
AC_SUBST($foo)
Unlike Perl... I don't think shells support this. I could be wrong
though... it's happened before. Anyway if this doesn't work then
again I'd just like to isolate debugging either on a package by
package basis and/or concept basis (like serialization).
--
Brian Jones <[EMAIL PROTECTED]>
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath