summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 ae5c11050ef..f44ab15eb75 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 5696dfb6e2e..98ebba57a7c 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 b885690ec53..1ee1d680bce 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 671e9bdbe8a..2e346c15afd 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 4aa1ab58385..ce9d5dcf350 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) {