summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.in3
-rw-r--r--common.mk6
-rw-r--r--configure.in2
-rw-r--r--ext/extmk.rb2
-rw-r--r--ext/purelib.rb2
6 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a737468f8..cac4186fb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 8 16:41:20 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (MINIRUBY), common.mk (RUBYOPT): add purelib.rb.
+ [ruby-core:16642]
+
Thu May 8 16:00:41 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (parser_yylex): ! and ? at the bottom are no longer part
diff --git a/Makefile.in b/Makefile.in
index 9fc2803f5a..038f324447 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -39,6 +39,9 @@ empty =
OUTFLAG = @OUTFLAG@$(empty)
COUTFLAG = @COUTFLAG@$(empty)
CFLAGS = @CFLAGS@ @ARCH_FLAG@
+cflags = @cflags@
+optflags = @optflags@
+debugflags = @debugflags@
XCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) @XCFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
diff --git a/common.mk b/common.mk
index 6034547f5a..b80d829001 100644
--- a/common.mk
+++ b/common.mk
@@ -4,7 +4,8 @@ dll: $(LIBRUBY_SO)
.SUFFIXES: .inc
-RUBYOPT =
+RUBYLIB = -
+RUBYOPT = -rpurelib.rb
STATIC_RUBY = static-ruby
@@ -114,6 +115,9 @@ all: $(MKFILES) $(PREP) incs $(RBCONFIG) $(LIBRUBY) encs
@$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" $(EXTMK_ARGS)
prog: $(PROGRAM) $(WPROGRAM)
+loadpath: $(PREP)
+ $(MINIRUBY) -e 'p $$:'
+
$(PREP): $(MKFILES)
miniruby$(EXEEXT): config.status $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(ARCHFILE)
diff --git a/configure.in b/configure.in
index aeb8ddf6fb..2c51d35ea4 100644
--- a/configure.in
+++ b/configure.in
@@ -1488,6 +1488,8 @@ if test x"$cross_compiling" = xyes; then
RUNRUBY='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
else
MINIRUBY='./miniruby$(EXEEXT) -I$(srcdir)/lib'
+ MINIRUBY="$MINIRUBY"' -I$(EXTOUT)/$(arch) -I$(EXTOUT)/common'
+ MINIRUBY="$MINIRUBY"' -I./- -I$(srcdir)/ext -rpurelib.rb'
PREP='miniruby$(EXEEXT)'
RUNRUBY='$(MINIRUBY) $(srcdir)/runruby.rb --extout=$(EXTOUT)'
fi
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 667aad0573..db2682ef9e 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -348,7 +348,7 @@ $ruby << " -I'$(topdir)'"
unless CROSS_COMPILING
$ruby << " -I'$(top_srcdir)/lib'"
$ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
- $ruby << " -I'$(top_srcdir)/ext' -rpurelib.rb"
+ $ruby << " -I./- -I'$(top_srcdir)/ext' -rpurelib.rb"
ENV["RUBYLIB"] = "-"
ENV["RUBYOPT"] = "-rpurelib.rb"
end
diff --git a/ext/purelib.rb b/ext/purelib.rb
index 10ee06176c..284254a8b4 100644
--- a/ext/purelib.rb
+++ b/ext/purelib.rb
@@ -1,3 +1,3 @@
-if nul = $:.index("-")
+if nul = $:.find_index {|path| /\A(?:\.\/)*-\z/ =~ path}
$:[nul..-1] = ["."]
end