projects
/
org.ibex.tool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
022eeab
)
process Preprocessor define property
author
crawshaw
<crawshaw@ibex.org>
Tue, 23 Nov 2004 15:30:32 +0000
(15:30 +0000)
committer
crawshaw
<crawshaw@ibex.org>
Tue, 23 Nov 2004 15:30:32 +0000
(15:30 +0000)
darcs-hash:
20041123153032
-2eb37-
11da784cb023fd2462b46b322dc2cc5295f6158d
.gz
src/java/org/ibex/tool/Compiler.java
patch
|
blob
|
history
diff --git
a/src/java/org/ibex/tool/Compiler.java
b/src/java/org/ibex/tool/Compiler.java
index
5b14672
..
8d10ce3
100644
(file)
--- a/
src/java/org/ibex/tool/Compiler.java
+++ b/
src/java/org/ibex/tool/Compiler.java
@@
-82,14
+82,26
@@
public class Compiler {
private ClassLoader loader = ClassLoader.getSystemClassLoader();
private Map loaded = new HashMap();
private PrintWriter out = new PrintWriter(System.out);
private ClassLoader loader = ClassLoader.getSystemClassLoader();
private Map loaded = new HashMap();
private PrintWriter out = new PrintWriter(System.out);
- private Preprocessor preprocessor = new Preprocessor(null, null, Collections.EMPTY_LIST);
+ private Preprocessor preprocessor;
private Source[] sources;
private File builddir = new File(".");
private File sourcedir = new File(".");
private Source[] sources;
private File builddir = new File(".");
private File sourcedir = new File(".");
- public Compiler() { }
+ public Compiler() {
+ List defs = Collections.EMPTY_LIST;
+
+ String define = System.getProperty("org.ibex.tool.preprocessor.define");
+ if (define != null) {
+ defs = new ArrayList();
+ StringTokenizer st = new StringTokenizer(define.toUpperCase(), ",");
+ while (st.hasMoreTokens()) defs.add(st.nextToken().trim());
+ }
+
+ preprocessor = new Preprocessor(null, null, defs);
+ }
+
public void setBuildDir(String dir) { builddir = new File(dir == null ? "." : dir); }
public void setSourceDir(String dir) { sourcedir = new File(dir == null ? "." : dir); }
public void setBuildDir(String dir) { builddir = new File(dir == null ? "." : dir); }
public void setSourceDir(String dir) { sourcedir = new File(dir == null ? "." : dir); }