Skip to content
Newer
Older
100644 55 lines (42 sloc) 1.73 KB
1a924ff @mwotton clean up extension loading
authored
1
0d29a7a @mwotton move zlib install to after update
authored
2 include Rake::DSL
3f9e869 @mwotton rip out jeweler, use bundler skeleton task
authored
3 require 'bundler'
4 Bundler::GemHelper.install_tasks
5 require 'rake'
6 require 'fileutils'
37cf546 @mwotton add jeweler, tests for multi args
authored
7
8 # require 'rake-compiler'
9 require 'rake/extensiontask'
10 # require 'rake/extensiontesttask'
11
12
3f9e869 @mwotton rip out jeweler, use bundler skeleton task
authored
13 # task "build:native" => [:no_extconf, :native, :build] do
14 # file = "pkg/stub-#{`cat VERSION`.chomp}.gem"
15 # mv file, "#{file.ext}-i686-linux.gem"
16 # end
37cf546 @mwotton add jeweler, tests for multi args
authored
17
18
3f9e869 @mwotton rip out jeweler, use bundler skeleton task
authored
19 Rake::ExtensionTask.new('stub')
37cf546 @mwotton add jeweler, tests for multi args
authored
20
3f9e869 @mwotton rip out jeweler, use bundler skeleton task
authored
21 # intended to be called by the gem builder
22 task :haskell_compile => [:compile] do
d453f5b Fixed problem with newline.
Benjamin Cook authored
23 ghc_version=`which ghc`.strip
4b6b4c9 Modified Rakefile to use `which ghc` instead of hardcoding /usr/bin/g…
Benjamin Cook authored
24
3f9e869 @mwotton rip out jeweler, use bundler skeleton task
authored
25 # write the Includes file
26 pwd =`pwd`.strip
27 arch_headers = "#{RbConfig::CONFIG['rubyhdrdir']}/#{RbConfig::CONFIG['arch']}"
28 lib_dir = RbConfig::CONFIG['libdir']
29 headers = RbConfig::CONFIG['rubyhdrdir']
30 File.open("#{pwd}/Haskell/Language/Ruby/Hubris/Includes.hs","w") do |file|
31 file.write "module Language.Ruby.Hubris.Includes where
32 extraIncludeDirs = [\"#{headers}\", \"#{arch_headers}\"]"
33 end
34 # command="cd Haskell; cabal update; cabal install
35 # --extra-include-dirs=#{RbConfig::CONFIG['rubyhdrdir']}
36 # --extra-include-dirs=#{RbConfig::CONFIG['rubyhdrdir']}/#{RbConfig::CONFIG['arch']} --extra-lib-dirs=#{RbConfig::CONFIG['libdir']} --user --enable-shared --with-ghc=#{ghc_version}"
670e210 @mwotton move cabal update to .travis
authored
37 command="cabal install zlib --enable-shared; cd Haskell; cabal install --extra-include-dirs=#{arch_headers} --extra-include-dirs=#{headers} --extra-lib-dirs=#{lib_dir} --user --enable-shared --with-ghc=#{ghc_version} --verbose --disable-library-profiling"
f238ed7 @mwotton back to cabal, cabal-dev seems broken
authored
38 puts "running #{command}"
3f9e869 @mwotton rip out jeweler, use bundler skeleton task
authored
39 result=%x{#{command}}
37cf546 @mwotton add jeweler, tests for multi args
authored
40 end
41
42 task :no_extconf do
43 $gemspec.extensions = []
44 end
45
3f9e869 @mwotton rip out jeweler, use bundler skeleton task
authored
46 task :default => :haskell_compile
eea4945 @mwotton basic operations working with GHC HEAD
authored
47
d38a21b @mwotton booleans working. True and False are different types in ruby. Strange…
authored
48 task :clean do
86b4c2e @mwotton save it before savage changes
authored
49 FileList[File.expand_path("~/.hubris_cache/*"),
3f9e869 @mwotton rip out jeweler, use bundler skeleton task
authored
50 'lib*.so', 'lib/*.o' ].each do |f|
51 File.delete(f) rescue nil
d38a21b @mwotton booleans working. True and False are different types in ruby. Strange…
authored
52 end
53 end
3f9e869 @mwotton rip out jeweler, use bundler skeleton task
authored
54
Something went wrong with that request. Please try again.