SV: SV: Adding another configuration feature to libjava for arm-elfmetal configurations

chris burdess dog@bluezoo.org
Fri May 2 15:13:00 GMT 2003


Øyvind Harboe wrote:
> Regarding conditional compilation.
> 
> Couldn't you use some annotation scheme like the 
> web-guys are so crazy about?

why not just use cpp? e.g.:

public class t
{
  public static void main(String[] args)
  {
#ifdef MYVAR
    System.out.println("Compiled with MYVAR");
#endif
    System.out.println("Hello world!");
  }
}

# cpp -P -D MYVAR t.java.pp t.java
# gcj -C t.java

this would seem to be a pretty standard and well-understood conditional
compilation scheme, as well as being part of gcc.
-- 
chris burdess



More information about the Java mailing list