Merge pull request #4264 from shuujii/integrate-definition-of-exefile

Integrate definition of `MRuby::Build#exefile`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-02-07 07:05:05 +09:00
committed by GitHub
2 changed files with 4 additions and 15 deletions
+4 -1
View File
@@ -270,8 +270,11 @@ EOS
def exefile(name)
if name.is_a?(Array)
name.flatten.map { |n| exefile(n) }
else
elsif File.extname(name).empty?
"#{name}#{exts.executable}"
else
# `name` sometimes have (non-standard) extension (e.g. `.bat`).
name
end
end
@@ -1,17 +1,3 @@
module MRuby
class Build
def exefile(name)
if name.is_a?(Array)
name.flatten.map { |n| exefile(n) }
elsif name !~ /\./
"#{name}#{exts.executable}"
else
name
end
end
end
end
MRuby.each_target do
next if kind_of? MRuby::CrossBuild