2009-02-12 18:49:50 +00:00
|
|
|
require 'erlbox'
|
|
|
|
require 'erlbox/driver'
|
2008-12-06 06:20:26 +00:00
|
|
|
|
|
|
|
CLOBBER.include %w( c_src/system )
|
|
|
|
|
2009-02-12 18:49:50 +00:00
|
|
|
UNIT_TEST_FLAGS << '+A10'
|
|
|
|
INT_TEST_FLAGS << '+A10'
|
2008-12-06 06:20:26 +00:00
|
|
|
|
|
|
|
DB_LIB = "c_src/system/lib/libdb.a"
|
|
|
|
|
|
|
|
file DB_LIB do
|
|
|
|
sh "cd c_src && ./buildlib.sh 2>&1"
|
|
|
|
end
|
|
|
|
|
2009-02-12 18:49:50 +00:00
|
|
|
# This is a slightl kludgey way of getting DB_LIB into
|
|
|
|
# dependency chain early enough
|
|
|
|
file 'c_src/bdberl_drv.c' => [DB_LIB]
|
2008-12-16 22:22:04 +00:00
|
|
|
|
2009-02-12 18:49:50 +00:00
|
|
|
task :package do
|
|
|
|
target_dir = package_dir
|
2008-12-16 20:16:23 +00:00
|
|
|
Dir.mkdir "#{target_dir}/priv/bin"
|
2009-02-12 18:49:50 +00:00
|
|
|
FileUtils.cp_r Dir.glob('c_src/system/bin/*'), "#{target_dir}/priv/bin", :verbose => false
|
2008-12-16 20:16:23 +00:00
|
|
|
end
|