Skip to content

Commit df4bd21

Browse files
authored
Don't use mkmf to generate dummy Makefile (#155)
GitHub: fix GH-153 mkmf requires fileutils. JRuby doesn't like it.
1 parent 7dcb40b commit df4bd21

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)