Always use copy for windows in extconf

to resolve build failure with Ruby 2.3.

See: https://github.com/k0kubun/hamlit/issues/69
This commit is contained in:
Takashi Kokubun 2016-06-03 20:59:31 +09:00
parent 3965a7e3ef
commit 8828f67132
1 changed files with 3 additions and 5 deletions

View File

@ -7,12 +7,10 @@ $CFLAGS << ' -Wall -Wextra'
$srcs = %w[hamlit.c]
Dir[File.join(houdini_dir, '*.c')].each do |path|
src = File.basename(path)
begin
FileUtils.ln_s(path, src, force: true)
rescue NotImplementedError
# For the error on windows:
# symlink() function is unimplemented on this machine (NotImplementedError)
if /mswin|mingw/ =~ RUBY_PLATFORM
FileUtils.cp(path, src)
else
FileUtils.ln_s(path, src, force: true)
end
$srcs << src
end