summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/json/parser/prereq.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/json/parser/prereq.mk b/ext/json/parser/prereq.mk
new file mode 100644
index 00000000000..be7bcb43190
--- /dev/null
+++ b/ext/json/parser/prereq.mk
@@ -0,0 +1,10 @@
+RAGEL = ragel
+
+.SUFFIXES: .rl
+
+.rl.c:
+ $(RAGEL) -G2 $<
+ $(BASERUBY) -pli -e '$$_.sub!(/[ \t]+$$/, "")' \
+ -e '$$_.sub!(/^static const int (JSON_.*=.*);$$/, "enum {\\1};")' $@
+
+parser.c: