diff options
author | Sutou Kouhei <kou@clear-code.com> | 2019-12-25 06:28:56 +0900 |
---|---|---|
committer | Sutou Kouhei <kou@clear-code.com> | 2019-12-25 06:28:56 +0900 |
commit | d76da276ba556bdefdddcc775b7f7907b8e1273e (patch) | |
tree | 5a997e2d56f7959c1665d62d8fde03464567def7 | |
parent | 0554e79be411f323612042954b28ba1747c641d8 (diff) | |
download | rake-compiler-d76da276ba556bdefdddcc775b7f7907b8e1273e.tar.gz |
cross-ruby: remove needless Makefile.in preparation
ALT_SEPARATOR doesn't exist in Makefile.in since Ruby 1.9.2:
https://github.com/ruby/ruby/commit/7c7690045870396816624bf57775eb29e6a478fd
-rw-r--r-- | tasks/bin/cross-ruby.rake | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake index 37dd220..c9b0bbb 100644 --- a/tasks/bin/cross-ruby.rake +++ b/tasks/bin/cross-ruby.rake @@ -96,36 +96,6 @@ file source_dir => ["#{USER_HOME}/sources/#{source_file}"] do |t| end end -# backup makefile.in -if RUBY_CC_VERSION >= "ruby-2.7.0" - makefile_in = "#{source_dir}/template/Makefile.in" -else - makefile_in = "#{source_dir}/Makefile.in" -end -makefile_in_bak = "#{makefile_in}.bak" -file makefile_in_bak => [source_dir] do |t| - cp makefile_in, makefile_in_bak -end - -# correct the makefiles -file makefile_in => [makefile_in_bak] do |t| - content = File.open(makefile_in_bak, 'rb') { |f| f.read } - - out = "" - - content.each_line do |line| - if line =~ /^\s*ALT_SEPARATOR =/ - out << "\t\t ALT_SEPARATOR = \"\\\\\\\\\"; \\\n" - else - out << line - end - end - - when_writing("Patching Makefile.in") { - File.open(makefile_in, 'wb') { |f| f.write(out) } - } -end - task :mingw32 do unless MINGW_HOST then warn "You need to install mingw32 cross compile functionality to be able to continue." @@ -135,7 +105,7 @@ task :mingw32 do end # generate the makefile in a clean build location -file "#{build_dir}/Makefile" => [build_dir, makefile_in] do |t| +file "#{build_dir}/Makefile" => [build_dir, source_dir] do |t| options = [ "--host=#{MINGW_HOST}", |