Project

General

Profile

Actions

Bug #8074

closed

Call init_mkmf for main

Added by nobu (Nobuyoshi Nakada) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
ruby -v:
2.0.0
Backport:
[ruby-core:53307]

Description

=begin
((URL:https://github.com/ruby/ruby/pull/257))

When (({MakeMakefile})) is extended on itself there is a call to (({init_mkmf})).
This method mainly setups various global variables, but it also sets ((|@libdir_basename|)) to default value ((%"lib"%)).

When (({MakeMakefile})) is included in main object there is no call to (({init_mkmf})).
That's why ((|@libdir_basename|)) is not set for main object.

Therefore when we invoke mkmf methods on main object ((|@libdir_basename|)) is nil.
That leads to incorrect lib path when ((%--with-XXX-dir%)) is used.
=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r39717.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


mkmf.rb: defer use of instance variable

  • lib/mkmf.rb (MakeMakefile#dir_config, MakeMakefile#_libdir_basename):
    defer use of instance variable until needed. [Bug #8074]
Actions

Also available in: Atom PDF

Like0
Like0