summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--common.mk7
-rw-r--r--ext/json/parser/prereq.mk8
3 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5fc42efee6a..e3b79d01d3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jul 29 06:51:30 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * common.mk (EXT_SRCS): add ext/json/parser/parser.c.
+
Thu Jul 29 05:52:15 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_s_basename): pass baselen to rmext.
diff --git a/common.mk b/common.mk
index 66dab00f5ba..fb8f78b1c2d 100644
--- a/common.mk
+++ b/common.mk
@@ -702,7 +702,7 @@ INSNS2VMOPT = --srcdir="$(srcdir)"
srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}newline.c srcs-ext srcs-enc
-EXT_SRCS = $(srcdir)/ext/ripper/ripper.c
+EXT_SRCS = $(srcdir)/ext/ripper/ripper.c $(srcdir)/ext/json/parser/parser.c
srcs-ext: $(EXT_SRCS)
@@ -753,9 +753,12 @@ $(REVISION_H): $(srcdir)/version.h $(srcdir)/ChangeLog $(srcdir)/tool/file2lastr
@-$(BASERUBY) $(srcdir)/tool/file2lastrev.rb --revision.h "$(srcdir)" > "$(srcdir)/revision.tmp"
@$(IFCHANGE) "--timestamp=$@" "$(srcdir)/revision.h" "$(srcdir)/revision.tmp"
-$(EXT_SRCS):
+$(srcdir)/ext/ripper/ripper.c:
$(CHDIR) $(@D) && $(exec) $(MAKE) -f depend $(MFLAGS) top_srcdir=../.. srcdir=.
+$(srcdir)/ext/json/parser/parser.c:
+ $(CHDIR) $(@D) && $(exec) $(MAKE) -f prereq.mk $(MFLAGS) top_srcdir=../../.. srcdir=.
+
##
run: miniruby$(EXEEXT) PHONY
diff --git a/ext/json/parser/prereq.mk b/ext/json/parser/prereq.mk
new file mode 100644
index 00000000000..f5d22d058e2
--- /dev/null
+++ b/ext/json/parser/prereq.mk
@@ -0,0 +1,8 @@
+RAGEL = ragel
+
+.SUFFIXES: .rl
+
+.rl.c:
+ $(RAGEL) -G2 $<
+
+parser.c: