diff options
Diffstat (limited to 'src/java/com/sun/gluegen/GlueGen.java')
-rw-r--r-- | src/java/com/sun/gluegen/GlueGen.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/java/com/sun/gluegen/GlueGen.java b/src/java/com/sun/gluegen/GlueGen.java index a7c64a8..1a7c690 100644 --- a/src/java/com/sun/gluegen/GlueGen.java +++ b/src/java/com/sun/gluegen/GlueGen.java @@ -67,6 +67,7 @@ public class GlueGen implements GlueEmitterControls { Reader reader = null; String filename = null; String emitterClass = null; + String outputRootDir = null; java.util.List cfgFiles = new ArrayList(); if (args.length == 0) { @@ -82,6 +83,8 @@ public class GlueGen implements GlueEmitterControls { for (int j = 0; j < paths.length; j++) { includePaths.add(paths[j]); } + } else if (arg.startsWith("-O")) { + outputRootDir = arg.substring(2); } else if (arg.startsWith("-E")) { emitterClass = arg.substring(2); } else if (arg.startsWith("-C")) { @@ -180,6 +183,16 @@ public class GlueGen implements GlueEmitterControls { emit.readConfigurationFile((String) iter.next()); } + if(null!=outputRootDir && outputRootDir.trim().length()>0) { + if(emit instanceof JavaEmitter) { + // FIXME: hack to interfere with the *Configuration setting via commandlines + JavaEmitter jemit = (JavaEmitter)emit; + if(null!=jemit.getConfig()) { + jemit.getConfig().setOutputRootDir(outputRootDir); + } + } + } + // Provide MachineDescriptions to emitter MachineDescription md32 = new MachineDescription32Bit(); MachineDescription md64 = new MachineDescription64Bit(); |