summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-21 09:25:58 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-21 09:25:58 +0000
commitb069230a3a395ee57a9874bb6667bb704c09f2a8 (patch)
treeb8b6b7d465dfaeaa87ee196d7d8107227357ebd8
parentb8986bfdd69e54a1cd5ac9a51ebc6fc49446f8a1 (diff)
see ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog12
-rw-r--r--Makefile.in14
-rw-r--r--configure.in4
-rw-r--r--ext/extmk.rb.in3
-rw-r--r--instruby.rb6
5 files changed, 34 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3cc375fa179..23fb0e62c3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 b2dddb45e8c..e4b6fd5b6e9 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 308371961f7..c93cb4b7bc4 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 90e6c71592f..97152065c4f 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 444b7e6465b..da773c08257 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|