File: extconf.rb

package info (click to toggle)
ruby-debug-inspector 1.1.0%2Bgh-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 128 kB
  • sloc: ansic: 90; ruby: 68; sh: 4; makefile: 4
file content (19 lines) | stat: -rwxr-xr-x 397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
def fake_makefile
  File.open("Makefile", "w") { |f|
    f.puts '.PHONY: install'
    f.puts 'install:'
    f.puts "\t" + '@echo "This Ruby not supported by/does not require debug_inspector."'
  }
end

def mri_2_or_3?
  defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" &&
    RUBY_VERSION =~ /^[23]/
end

if mri_2_or_3?
  require 'mkmf'
  create_makefile('debug_inspector')
else
  fake_makefile
end