Feature #5658
Wrap mkmf.rb in a module to clean up documentation
| Status: | Closed | Start date: | 11/22/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | lib | |||
| Target version: | 2.0.0 |
Description
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
Associated revisions
* 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
History
Updated by nobu (Nobuyoshi Nakada) 6 months ago
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?
Updated by drbrain (Eric Hodel) 6 months 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) 6 months ago
- File mkmf.rb.in_a_module.2.patch added
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) 6 months ago
- File mkmf.rb.in_a_module.no_whitespace.patch added
Here is a separate patch of lib/mkmf.rb without whitespace changes for verification purposes
Updated by nobu (Nobuyoshi Nakada) 6 months ago
- Assignee set to drbrain (Eric Hodel)
It seems same as mine.
Let's try it.
Updated by drbrain (Eric Hodel) 6 months 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