-
Notifications
You must be signed in to change notification settings - Fork 9
/
Rakefile
35 lines (29 loc) · 898 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require "bundler/gem_tasks"
task :doc do
srcs = []
Dir.glob("ext/numo/linalg/*").each do |d|
if File.exist?(d+"/extconf.rb")
sh "cd #{d}; ruby extconf.rb; make clean; make src"
srcs << d+"/*.c"
end
end
srcs << "lib/numo/linalg.rb"
srcs << "lib/numo/linalg/*.rb"
sh "yard -m markdown -o yard -r README.md #{srcs.join(' ')}"
end
task :cleandoc do
sh "rm -r yard .yardoc"
end
require 'rake/extensiontask'
Rake::ExtensionTask.new 'numo/linalg/blas'
Rake::ExtensionTask.new 'numo/linalg/lapack'
CLOBBER.include('lib/numo/linalg/site_conf.rb')
task :compile do
site_conf = Dir['./tmp/**/numo/linalg/blas/**/lib/site_conf.rb'].first
cp site_conf, 'lib/numo/linalg'
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = '--color --format documentation --require spec_helper'
end
task :default => [:clobber, :compile, :spec]