summaryrefslogtreecommitdiff
path: root/rules/ognl/generated-sources.mk
diff options
context:
space:
mode:
Diffstat (limited to 'rules/ognl/generated-sources.mk')
-rw-r--r--rules/ognl/generated-sources.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules/ognl/generated-sources.mk b/rules/ognl/generated-sources.mk
new file mode 100644
index 0000000..338247d
--- /dev/null
+++ b/rules/ognl/generated-sources.mk
@@ -0,0 +1,9 @@
+JJTREE = $(JAVA) org.javacc.jjtree.Main
+JAVACC = $(JAVA) org.javacc.parser.Main
+
+target/generated-sources: target/generated-sources/ognl
+target/generated-sources/ognl: src/java/ognl/ognl.jjt
+ $(RM) -r $@
+ $(JJTREE) -BUILD_NODE_FILES=false -OUTPUT_DIRECTORY=$@ $< || { $(RM) -r $@; $(FAIL); }
+ $(JAVACC) -OUTPUT_DIRECTORY=$@ $@/ognl.jj || { $(RM) -r $@; $(FAIL); }
+ $(RM) $@/Node.java