ruby-changes:66311
From: nagachika <ko1@a...>
Date: Sat, 29 May 2021 14:05:06 +0900 (JST)
Subject: [ruby-changes:66311] 9d63a8dd0b (ruby_3_0): merge revision(s) 5cdf99f64e344b8e4638824d55f5caf33be682ca: [Backport #17761]
https://git.ruby-lang.org/ruby.git/commit/?id=9d63a8dd0b From 9d63a8dd0beefa49796eb86ab688c2eb0cd89a20 Mon Sep 17 00:00:00 2001 From: nagachika <nagachika@r...> Date: Sat, 29 May 2021 13:39:20 +0900 Subject: merge revision(s) 5cdf99f64e344b8e4638824d55f5caf33be682ca: [Backport #17761] mkmf: fixed install directories of header files in extension libraries [Bug #17761] When installing an extension library which provides a header, that header should be installed under site_ruby (or vendor_ruby when "--vendor" option was given to extconf.rb). However, currently this file is about to be installed in the core include directory. --- lib/mkmf.rb | 8 ++++---- test/mkmf/test_install.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 test/mkmf/test_install.rb --- lib/mkmf.rb | 8 ++++---- test/mkmf/test_install.rb | 30 ++++++++++++++++++++++++++++++ version.h | 4 ++-- 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 test/mkmf/test_install.rb diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 995934c..9468a2c 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -207,8 +207,8 @@ module MakeMakefile https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L207 ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'], ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'], ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'], - ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], - ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], + ['HDRDIR', '$(vendorhdrdir)$(target_prefix)'], + ['ARCHHDRDIR', '$(vendorarchhdrdir)$(target_prefix)'], ] else dirs = [ @@ -216,8 +216,8 @@ module MakeMakefile https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L216 ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'], ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'], ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'], - ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], - ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], + ['HDRDIR', '$(sitehdrdir)$(target_prefix)'], + ['ARCHHDRDIR', '$(sitearchhdrdir)$(target_prefix)'], ] end dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")] diff --git a/test/mkmf/test_install.rb b/test/mkmf/test_install.rb new file mode 100644 index 0000000..7f8c603 --- /dev/null +++ b/test/mkmf/test_install.rb @@ -0,0 +1,30 @@ https://github.com/ruby/ruby/blob/trunk/test/mkmf/test_install.rb#L1 +# frozen_string_literal: false +require_relative 'base' + +class TestMkmf + class TestInstall < TestMkmf + def test_install_dirs + Dir.mktmpdir do |dir| + File.write(dir+"/extconf.rb", "require 'mkmf'; create_makefile('test')") + all_assertions do |a| + a.foreach( + ["site"], + ["vendor", "--vendor"], + ) do |dest, *options| + assert_ruby_status(["-C", dir, "extconf.rb", *options]) + mf = File.read(dir+"/Makefile") + a.foreach( + ["RUBYCOMMONDIR", "$(#{dest}dir)$(target_prefix)"], + ["RUBYLIBDIR", "$(#{dest}libdir)$(target_prefix)"], + ["RUBYARCHDIR", "$(#{dest}archdir)$(target_prefix)"], + ["HDRDIR", "$(#{dest}hdrdir)$(target_prefix)"], + ["ARCHHDRDIR", "$(#{dest}archhdrdir)$(target_prefix)"], + ) do |(var, path)| + assert_equal path, mf[/^#{var}\s*=\s*(.*)$/, 1] + end + end + end + end + end + end +end diff --git a/version.h b/version.h index 4496d69..21e0ab9 100644 --- a/version.h +++ b/version.h @@ -12,11 +12,11 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L12 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 2 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 88 +#define RUBY_PATCHLEVEL 89 #define RUBY_RELEASE_YEAR 2021 #define RUBY_RELEASE_MONTH 5 -#define RUBY_RELEASE_DAY 23 +#define RUBY_RELEASE_DAY 29 #include "ruby/version.h" -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/