summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-24 04:44:11 +0100
committerSven Gothel <[email protected]>2015-03-24 04:44:11 +0100
commitc8439e78c9e8ba4040bb723252a1c8fec00f904b (patch)
tree6c393b8d2ccb8b5be6659dea58c9163285458077 /src/java/com/jogamp/gluegen
parent19315f8f48012ede41c325d72526a612002737f8 (diff)
Bug 1149 - Replacing PCPP w/ JCPP: Name used CPP impl.
Diffstat (limited to 'src/java/com/jogamp/gluegen')
-rw-r--r--src/java/com/jogamp/gluegen/GlueGen.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/java/com/jogamp/gluegen/GlueGen.java b/src/java/com/jogamp/gluegen/GlueGen.java
index 4153518..d0ce9ed 100644
--- a/src/java/com/jogamp/gluegen/GlueGen.java
+++ b/src/java/com/jogamp/gluegen/GlueGen.java
@@ -100,10 +100,11 @@ public class GlueGen implements GlueEmitterControls {
}
}
+ /** GlueGen's build in macro name {@value}, when compiling w/ GlueGen. */
public static final String __GLUEGEN__ = "__GLUEGEN__";
@SuppressWarnings("unchecked")
- public void run(final Reader reader, final String filename, final Class<?> emitterClass, final List<String> includePaths, final List<String> cfgFiles, final String outputRootDir, final boolean copyPCPPOutput2Stderr) {
+ public void run(final Reader reader, final String filename, final Class<?> emitterClass, final List<String> includePaths, final List<String> cfgFiles, final String outputRootDir, final boolean copyCPPOutput2Stderr) {
try {
if(debug) {
@@ -127,17 +128,18 @@ public class GlueGen implements GlueEmitterControls {
}
final JavaConfiguration cfg = emit.getConfiguration();
- final File out = File.createTempFile("PCPPTemp", ".pcpp");
+ final File out = File.createTempFile("CPPTemp", ".cpp");
final FileOutputStream outStream = new FileOutputStream(out);
+ // preprocessor = new PCPP(includePaths, debug, copyCPPOutput2Stderr);
+ preprocessor = new JCPP(includePaths, debug, copyCPPOutput2Stderr);
+ final String cppName = preprocessor.getClass().getSimpleName();
if(debug) {
- System.err.println("PCPP output at (persistent): " + out.getAbsolutePath());
+ System.err.println("CPP <"+cppName+"> output at (persistent): " + out.getAbsolutePath());
} else {
out.deleteOnExit();
}
- // preprocessor = new PCPP(includePaths, debug, copyPCPPOutput2Stderr);
- preprocessor = new JCPP(includePaths, debug, copyPCPPOutput2Stderr);
preprocessor.addDefine(__GLUEGEN__, "2");
preprocessor.setOut(outStream);
@@ -145,7 +147,7 @@ public class GlueGen implements GlueEmitterControls {
outStream.flush();
outStream.close();
if(debug) {
- System.err.println("PCPP done");
+ System.err.println("CPP <"+cppName+"> done");
}
final FileInputStream inStream = new FileInputStream(out);
@@ -439,7 +441,7 @@ public class GlueGen implements GlueEmitterControls {
out.println("file or files can be specified with -C option; e.g,");
out.println("-Cjava-emitter.cfg.");
out.println(" --debug enables debug mode");
- out.println(" --dumpCPP directs PCPP to dump all output to stderr as well");
+ out.println(" --dumpCPP directs CPP to dump all output to stderr as well");
exit(1);
}
}