diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-08 07:41:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-08 07:41:23 +0000 |
commit | f3ad9bf9b3009ef1ac13222adc0aba5d7c156876 (patch) | |
tree | f8bceb77b9bde9399608216e4b23c6721dd8f04b | |
parent | 714cd205ccaf326abc1b275923dccaa58cfec6c3 (diff) | |
download | ruby-f3ad9bf9b3009ef1ac13222adc0aba5d7c156876.tar.gz |
* configure.in (MINIRUBY), common.mk (RUBYOPT): add purelib.rb.
[ruby-core:16642]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Makefile.in | 3 | ||||
-rw-r--r-- | common.mk | 6 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | ext/extmk.rb | 2 | ||||
-rw-r--r-- | ext/purelib.rb | 2 |
6 files changed, 17 insertions, 3 deletions
@@ -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@ @@ -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 |