This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Ø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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]