summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-19 03:37:55 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-19 03:37:55 +0000
commitc613f625b7c0c72771d74f86a1177e00290577df (patch)
treed7e26bf2edde33843626a5d3fcf02152b0c86d33
parentcc05dcd5fea3b6cfbb09298677f42395534a3a36 (diff)
2000-06-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--configure.in2
-rw-r--r--lib/mkmf.rb13
-rw-r--r--mkconfig.rb10
-rw-r--r--ruby.c7
5 files changed, 35 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index ae5c11050e..f44ab15eb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Sun Jun 18 22:49:13 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+
+ * configure.in: single quoted sitedir.
+
+ * mkconfig.rb: add DESTDIR for cross-compiling.
+
+ * lib/mkmf.rb: add DESTDIR.
+
+ * ruby.c (load_file): force binmode if fname includes ".exe"
+ on DOSISH.
+
Fri Jun 16 22:47:47 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.23.
diff --git a/configure.in b/configure.in
index 5696dfb6e2..98ebba57a7 100644
--- a/configure.in
+++ b/configure.in
@@ -866,7 +866,7 @@ test "$program_suffix" != NONE &&
RUBY_INSTALL_NAME="${ri_prefix}ruby${ri_suffix}"
RUBY_LIB_PREFIX="${prefix}/lib/ruby"
RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}"
-sitedir="${prefix}/lib/ruby/site_ruby"
+sitedir='${prefix}/lib/ruby/site_ruby'
AC_ARG_WITH(sitedir,
[--with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]],
[sitedir=$withval])
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index b885690ec5..1ee1d680bc 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -381,12 +381,13 @@ LDSHARED = #{CONFIG["LDSHARED"]} #{defflag}
RUBY_INSTALL_NAME = #{CONFIG["RUBY_INSTALL_NAME"]}
-prefix = #{CONFIG["prefix"]}
-exec_prefix = #{CONFIG["exec_prefix"]}
-libdir = #{$libdir}
-archdir = #{$archdir}
-sitelibdir = #{$sitelibdir}
-sitearchdir = #{$sitearchdir}
+DESTDIR =
+prefix = $(DESTDIR)#{CONFIG["prefix"]}
+exec_prefix = $(DESTDIR)#{CONFIG["exec_prefix"]}
+libdir = $(DESTDIR)#{$libdir}
+archdir = $(DESTDIR)#{$archdir}
+sitelibdir = $(DESTDIR)#{$sitelibdir}
+sitearchdir = $(DESTDIR)#{$sitearchdir}
#### End of system configuration section. ####
diff --git a/mkconfig.rb b/mkconfig.rb
index 671e9bdbe8..2e346c15af 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -20,7 +20,7 @@ module Config
# made to this file will be lost the next time ruby is built.
]
-print " CONFIG = {}\n"
+print " DESTDIR = '' if not defined? DESTDIR\n CONFIG = {}\n"
v_fast = []
v_others = []
has_version = false
@@ -72,6 +72,14 @@ if not has_version
}
end
+v_fast.collect! do |x|
+ if /"prefix"/ === x
+ x.sub(/= /, '= DESTDIR + ')
+ else
+ x
+ end
+end
+
print v_fast, v_others
print <<EOS
CONFIG["compile_dir"] = "#{Dir.pwd}"
diff --git a/ruby.c b/ruby.c
index 4aa1ab5838..ce9d5dcf35 100644
--- a/ruby.c
+++ b/ruby.c
@@ -679,6 +679,13 @@ load_file(fname, script)
fclose(fp);
f = rb_file_open(fname, "r");
+#if defined DOSISH || defined __CYGWIN__
+ {
+ char *ext = strrchr(fname, '.');
+ if (ext && strcasecmp(ext, ".exe") == 0)
+ rb_io_binmode(f);
+ }
+#endif
}
if (script) {