diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | Makefile.in | 14 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | ext/extmk.rb.in | 3 | ||||
-rw-r--r-- | instruby.rb | 6 |
5 files changed, 34 insertions, 5 deletions
@@ -1,3 +1,15 @@ +Sun May 21 17:31:37 2000 WATANABE Hirofumi <eban@os.rim.or.jp> + + * instruby.rb: support "make install" for cross-compiling. + + * ext/extmk.rb.in: ditto. + +Sun May 21 14:22:49 2000 WATANABE Hirofumi <eban@os.rim.or.jp> + + * Makefile.in: rename prep.rb to fake.rb. + + * configure.in: ditto. + Wed May 17 14:14:23 2000 Yukihiro Matsumoto <matz@netlab.co.jp> * re.c (rb_reg_new_1): use /m instead of /p. diff --git a/Makefile.in b/Makefile.in index b2dddb45e..e4b6fd5b6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -125,8 +125,18 @@ test: miniruby$(EXEEXT) rbconfig.rb: miniruby$(EXEEXT) @@MINIRUBY@ $(srcdir)/mkconfig.rb rbconfig.rb -prep.rb: miniruby$(EXEEXT) - @echo 'PLATFORM=RUBY_PLATFORM="@arch@"' > $@ +fake.rb: miniruby$(EXEEXT) + @echo ' \ + class Object; \ + remove_const :RUBY_PLATFORM; \ + RUBY_PLATFORM = "@arch@"; \ + if defined? PLATFORM; \ + remove_const :PLATFORM; \ + PLATFORM = "@arch@"; \ + end; \ + CROSS_COMPILING = true; \ + end \ + ' > $@ config.status: $(srcdir)/configure $(SHELL) ./config.status --recheck diff --git a/configure.in b/configure.in index 308371961..c93cb4b7b 100644 --- a/configure.in +++ b/configure.in @@ -688,8 +688,8 @@ if test "$fat_binary" = yes ; then fi if test x"$cross_compiling" = xyes; then - MINIRUBY='ruby -I.. -rprep' - PREP=prep.rb + MINIRUBY="ruby -I`pwd` -rfake" + PREP=fake.rb else MINIRUBY='./miniruby$(EXEEXT)' PREP='' diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 90e6c7159..97152065c 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -402,6 +402,9 @@ archdir = $(pkglibdir)/@arch@ ruby_interpreter = $topdir + "/miniruby@EXEEXT@" ruby_interpreter.gsub!("/", "\\") end + if defined? CROSS_COMPILING + ruby_interpreter = "@MINIRUBY@" + end mfile.printf <<EOS TARGET = #{target} diff --git a/instruby.rb b/instruby.rb index 444b7e646..da773c082 100644 --- a/instruby.rb +++ b/instruby.rb @@ -66,7 +66,11 @@ if RUBY_PLATFORM =~ /-aix/ end Dir.chdir "ext" -system "../miniruby#{exeext} extmk.rb install #{destdir}" +if defined? CROSS_COMPILING + system "#{CONFIG['MINIRUBY']} extmk.rb install #{destdir}" +else + system "../miniruby#{exeext} extmk.rb install #{destdir}" +end Dir.chdir CONFIG["srcdir"] Find.find("lib") do |f| |