Sha256: 2401ab0bbd7d04e3eff9da8168ce42788542c572232afc20156a48b3c0d8a6b1
Contents?: true
Size: 1.06 KB
Versions: 12
Compression:
Stored size: 1.06 KB
Contents
build_dir = File.expand_path('../../core/vendor/build', __FILE__) bin_dir = File.join(build_dir, 'bin') # Names of the various files to build. We're using variables here since they're # a bit too painful to type multiple times. liblbfgs = "core/vendor/build/lib/liblbfgs.#{RbConfig::CONFIG['DLEXT']}" crfsuite = 'core/vendor/build/bin/crfsuite' svm_classify = 'core/vendor/build/bin/svm_classify' svm_learn = 'core/vendor/build/bin/svm_learn' file liblbfgs do Dir.chdir('core/vendor/src/liblbfgs') do sh "./configure --prefix=#{build_dir}" sh 'make && make install && make distclean' end end file crfsuite => liblbfgs do Dir.chdir('core/vendor/src/crfsuite') do sh "./configure --prefix=#{build_dir} --with-liblbfgs=#{build_dir}" sh 'make && make install && make distclean' end end file svm_classify do Dir.chdir('core/vendor/src/svm_light') do sh 'make' sh "cp -f svm_classify svm_learn #{bin_dir}" sh 'make clean' end end namespace :c do desc 'Compiles the vendored C code' task :compile => [crfsuite, svm_classify] end
Version data entries
12 entries across 12 versions & 2 rubygems