Skip to content

Commit

Permalink
* configure.in (MINIRUBY), common.mk (RUBYOPT): add purelib.rb.
Browse files Browse the repository at this point in the history
  [ruby-core:16642]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed May 8, 2008
1 parent 714cd20 commit f3ad9bf
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@
Expand Down
6 changes: 5 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ dll: $(LIBRUBY_SO)

.SUFFIXES: .inc

RUBYOPT =
RUBYLIB = -
RUBYOPT = -rpurelib.rb

STATIC_RUBY = static-ruby

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ext/extmk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def $mflags.defined?(var)
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
Expand Down
2 changes: 1 addition & 1 deletion ext/purelib.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
if nul = $:.index("-")
if nul = $:.find_index {|path| /\A(?:\.\/)*-\z/ =~ path}
$:[nul..-1] = ["."]
end

0 comments on commit f3ad9bf

Please sign in to comment.