Project

General

Profile

Bug #8074

Call init_mkmf for main

Added by Nobuyoshi Nakada almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
ruby -v:
2.0.0
Backport:
2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
[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

Associated revisions

Revision 39717
Added by Nobuyoshi Nakada almost 3 years ago

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]

Revision 39717
Added by Nobuyoshi Nakada almost 3 years ago

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]

History

#1 Updated by Nobuyoshi Nakada almost 3 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]

Also available in: Atom PDF