nokogiri
nokogiri copied to clipboard
clean up platform detection in extconf.rb
We do a variety of stupid things including
- using RbConfig::CONFIG['target_os'] and RUBY_PLATFORM and RUBY_ENGINE and RCD_HOST_RUBY_PLATFORM
- subtly varying things to match on windows: mswin, mingw, mingw32, cygwin
It's sad, but build scripts with support for a variety of platforms are rarely straightforward. I don't think we can decrease the number of variables and conditions substantive. The tests are related to different issues.
For the Windows matches: Some of the tests are for Windows as the OS, some issues are specific to MRIs build environment mingw/mingw-w64, but don't apply to cygwin and some are specific to cross build for Windows/RubyInstaller.
I guess my point is that these tests aren't wrapped in a method with a semantic name that tells me what it does.
I've started this process with commit aa1baf4
Perhaps this is just a reminder to continue to whittle away at the accidental complexity in extconf.rb.
Now I get it.
I think we've cleaned most of this up over the last few years.