Project

General

Profile

Actions

Bug #21521

closed

Don't require dummy makefile in `extconf.rb`

Added by ioquatix (Samuel Williams) 6 days ago. Updated 6 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:122868]

Description

On some platforms, no native extensions should be created. Due to limitations in mkmf, it is typical to create a dummy makefile that does nothing:

https://github.com/search?q=File.write+Makefile+path%3A**%2Fextconf.rb&type=code

This seems like a bad pattern, I think it would be preferable to just do:

# extconf.rb

return if build_not_required?

require "mkmf"

...

create_makefile

Related issues 1 (1 open0 closed)

Related to Ruby - Feature #20152: mkmf / extconf: Add a proper way to not compile the extensionOpenActions

Updated by ioquatix (Samuel Williams) 6 days ago

  • Status changed from Open to Closed

Actually, this is probably a bug with RubyGems.

Actions #2

Updated by byroot (Jean Boussier) 6 days ago

  • Related to Feature #20152: mkmf / extconf: Add a proper way to not compile the extension added
Actions

Also available in: Atom PDF

Like0
Like0Like0