// True if we're emitting CNI code.
boolean cni;
+ // True if we've seen -cni or -jni.
+ boolean cniOrJniSeen;
+
// True if output files should always be written.
boolean force;
{
public void parsed(String arg0) throws OptionException
{
- if (cni)
+ if (cniOrJniSeen && cni)
throw new OptionException("only one of -jni or -cni may be used");
+ cniOrJniSeen = true;
cni = false;
}
});
{
public void parsed(String arg0) throws OptionException
{
+ if (cniOrJniSeen && ! cni)
+ throw new OptionException("only one of -jni or -cni may be used");
+ cniOrJniSeen = true;
cni = true;
}
});