diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | lib/mkmf.rb | 13 | ||||
-rw-r--r-- | mkconfig.rb | 10 | ||||
-rw-r--r-- | ruby.c | 7 |
5 files changed, 35 insertions, 8 deletions
@@ -1,3 +1,14 @@ +Sun Jun 18 22:49:13 2000 WATANABE Hirofumi <[email protected]> + + * 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 <[email protected]> * 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}" @@ -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) { |