/
Rakefile
48 lines (38 loc) · 1.15 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
require 'rubygems'
#gem 'hoe', '>= 2.1.0'
require 'hoe'
require 'fileutils'
# require './lib/hubris'
Hoe.plugin :newgem
$hoe = Hoe.spec 'hubris' do
self.developer 'Mark Wotton', 'mwotton@gmail.com'
self.rubyforge_name = "hubris"
self.summary = 'tool to help build .so files from haskell code for use in Ruby via dl'
self.post_install_message = 'PostInstall.txt'
self.readme_file = "README.markdown"
self.history_file = "HISTORY.markdown"
end
require 'newgem/tasks'
Dir['tasks/**/*.rake'].each { |t| load t }
#file "lib/RubyMap.hs" => ["lib/RubyMap.chs"] do
# str = "c2hs -v --cppopts='-I" + Hubris::RubyHeader + "' --cpp=gcc --cppopts=-E --cppopts=-xc lib/RubyMap.chs"
# # print str
# system(str)
#end
require 'spec'
require 'spec/rake/spectask'
# desc "Run the specs under spec/"
# all_examples = Spec::Rake::SpecTask.new do |t|
# t.spec_opts = ['--options', "spec/spec.opts"]
# t.spec_files = FileList['spec/*.rb']
# end
# task :spec => ["lib/RubyMap.hs"]
task :clean do
FileList[File.expand_path("~/.hubris_cache/*"),
'lib*.so', 'lib/*.o', 'libfoo_*.bundle' ].each do |f|
begin
File.delete(f)
rescue
end
end
end