Feature #5658
closedWrap mkmf.rb in a module to clean up documentation
Description
=begin
Currently all of the methods in mkmf.rb exist at the top-level. This causes methods from mkmf.rb to show up in Object in ((%ri%)).
The attached patch wraps the functionality of mkmf.rb in a module MakeMakefile which is then included at top-level.
This preserves the existing functionality while separating the documentation.
The patch survives make clean; make
on OS X 10.7
=end
Files
Updated by nobu (Nobuyoshi Nakada) almost 13 years ago
=begin
I agree the concept, and have planned for it.
But, the patch reverts (({try_func})) partially (and
unintentionally?), and (({try_header})) should be defined in the
module not only in (({Object})).
Also, since (({mkmf_failed})) should not be registered more than once,
(({END})) block should not be moved?
=end
Updated by drbrain (Eric Hodel) almost 13 years ago
I merged the try_func change and thought I got it right, but obviously not. I will check it again.
I will define try_header in MakeMakefile and restore the END behavior.
What do you think of the name "MakeMakefile"? I do not know if a name like "Mkmf" or "MkMf" would be better.
Updated by drbrain (Eric Hodel) almost 13 years ago
I fixed the accidental reversion of try_func and placed try_header in the module. I also fixed the tests.
I restored the position of the END block outside the module.
Updated by drbrain (Eric Hodel) almost 13 years ago
Here is a separate patch of lib/mkmf.rb without whitespace changes for verification purposes
Updated by nobu (Nobuyoshi Nakada) almost 13 years ago
- Assignee set to drbrain (Eric Hodel)
It seems same as mine.
Let's try it.
Updated by drbrain (Eric Hodel) almost 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r33890.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/mkmf.rb: Wrap mkmf.rb in module MakeMakefile to clean up Object
documentation. [Ruby 1.9 - Feature #5658] - ext/extmk.rb: Use MakeMakefile::CONFIG instead of Object::CONFIG
- test/mkmf/base.rb: ditto