diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2022-07-29 13:54:27 -0400 |
---|---|---|
committer | Yuta Saito <kateinoigakukun@gmail.com> | 2022-08-04 16:29:22 +0900 |
commit | e5a3f232563139fdf15660d54aeaec112ffc2349 (patch) | |
tree | 8a4c23500804f5d370d85216e6d73e6d7d14beb7 /tool/fake.rb | |
parent | c69582a5401ac7b6e59b87a8bcc8636c27eb923e (diff) |
Use $(bindir) for path to executable in mkmf
For the macOS -bundle_loader linker option, we need a path to the
Ruby exectuable. $(RUBY) is not necessarily a path since it could
be a command line invocation. That happens during build with
runruby.rb and can happen post installation if the user passes
the --ruby option to a extconf.rb. Use $(bindir) to locate
the executable instead.
Before installation, $(bindir) doesn't exist, so we need to be
able to override $(BUILTRUBY) in such situations so test-spec
and bundled extensions could build. Use a new mkmf global,
$builtruby, to do this; set it in fake.rb and in extmk.rb.
Our build system is quite complex...
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6193
Diffstat (limited to 'tool/fake.rb')
-rw-r--r-- | tool/fake.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tool/fake.rb b/tool/fake.rb index 88709b2f23..91dfb041c4 100644 --- a/tool/fake.rb +++ b/tool/fake.rb @@ -45,6 +45,7 @@ prehook = proc do |extmk| $extout_prefix = '$(extout)$(target_prefix)/' config = RbConfig::CONFIG mkconfig = RbConfig::MAKEFILE_CONFIG + $builtruby ||= File.join(builddir, config['RUBY_INSTALL_NAME'] + config['EXEEXT']) RbConfig.fire_update!("builddir", builddir) RbConfig.fire_update!("buildlibdir", builddir) RbConfig.fire_update!("libdir", builddir) |