classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A java DEBUG flag


From: Tom Tromey
Subject: Re: A java DEBUG flag
Date: 29 Nov 2000 19:52:06 -0700

>>>>> "Brian" == Brian Jones <address@hidden> writes:

Brian> I think I'd rather keep it to one java class and just use
Brian> multiple public final static variables.

I thought Bryce's plan was to have one master debug flag (a constant)
and then use properties for the individual things.

    if (Configuration.DEBUG && Boolean.getBoolean ("gnu.debug.this"))
      {
        ...
      }

Brian> Configure works like a shell script.  We have to define
Brian> variables by name and set them equal to true or false.  Then we
Brian> have to use AC_SUBST(VARIABLE_NAME).  I can't think of a way to
Brian> do this generically at the moment.  I don't think I've ever
Brian> seen an example of such either.

Sure.  You can make your own autoconf macro, something like
(untested):

dnl usage: DEBUG(variable, shell code)
AC_DEFUN([DEBUG],[
  $1=false
  if $2; then
    $1=true
  fi
  AC_SUBST([$1])
])

Then you can do `DEBUG(ALWAYS, true)' or whatever.

configure.in isn't just shell code, it has m4 preprocessing as well...

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]