Skip to content

Commit 2ec2051

Browse files
kouhsbt
authored andcommitted
[ruby/fiddle] Don't use mkmf to generate dummy Makefile
(ruby/fiddle#155) GitHub: fix ruby/fiddle#153 mkmf requires fileutils. JRuby doesn't like it. ruby/fiddle@df4bd21fc3
1 parent a51007f commit 2ec2051

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ext/fiddle/extconf.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# frozen_string_literal: true
2-
require 'mkmf'
2+
3+
require "rbconfig"
34

45
unless RUBY_ENGINE == "ruby"
5-
File.write('Makefile', dummy_makefile("").join)
6+
File.write('Makefile', <<-MAKEFILE)
7+
all install clean:
8+
#{RbConfig::CONFIG["NULLCMD"]}
9+
10+
.PHONY: all install clean
11+
MAKEFILE
612
return
713
end
814

15+
require 'mkmf'
16+
917
# :stopdoc:
1018

1119
def gcc?

0 commit comments

Comments
 (0)