Added sconscript
This commit is contained in:
parent
cafa9adb1a
commit
df196aa346
4 changed files with 45 additions and 2 deletions
29
src/bindings/ruby/SConscript
Normal file
29
src/bindings/ruby/SConscript
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# -*- python -*-
|
||||
import os.path
|
||||
Import("env libhammer_shared testruns targets")
|
||||
|
||||
rubysources = [
|
||||
Glob("test/*.rb"),
|
||||
Glob("lib/hammer.rb"),
|
||||
Glob("lib/*/*.rb"),
|
||||
"hammer-parser.gemspec",
|
||||
"Rakefile",
|
||||
"Gemfile",
|
||||
"Gemfile.lock",
|
||||
"README.md",
|
||||
]
|
||||
|
||||
rubyenv = env.Clone()
|
||||
rubyenv['ENV']['LD_LIBRARY_PATH'] = os.path.dirname(str(libhammer_shared[0]))
|
||||
rubyenv['RBDIR'] = os.path.dirname(str(rubyenv.File("Gemfile").path))
|
||||
|
||||
setup = rubyenv.Command(Dir(".bundle"), rubysources, "cd $RBDIR && bundle install")
|
||||
AlwaysBuild(setup)
|
||||
|
||||
rubytestexec = rubyenv.Command(None, [setup] + rubysources, "cd $RBDIR && bundle exec rake test")
|
||||
|
||||
rubytest = Alias("testruby", [rubytestexec], rubytestexec)
|
||||
AlwaysBuild(rubytestexec)
|
||||
testruns.append(rubytest)
|
||||
|
||||
# No need for an install target; everybody just uses gems for that.
|
||||
Loading…
Add table
Add a link
Reference in a new issue