summaryrefslogtreecommitdiffstats
path: root/ruby
diff options
context:
space:
mode:
authorHilko Bengen <bengen@hilluzination.de>2011-12-06 20:42:11 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-12-06 19:48:31 +0000
commit41a7a68cf33a174ba950aa29951a07c391a16b4d (patch)
treeb1ae2aa8eb8f1e7eb56ddf09134bbc6359468168 /ruby
parent2353b9d3b867fb19db4e403b49a93674d8b2682c (diff)
downloadlibguestfs-41a7a68cf33a174ba950aa29951a07c391a16b4d.tar.gz
libguestfs-41a7a68cf33a174ba950aa29951a07c391a16b4d.tar.xz
libguestfs-41a7a68cf33a174ba950aa29951a07c391a16b4d.zip
let the user explicitly choose ruby and rake programs
Diffstat (limited to 'ruby')
-rw-r--r--ruby/Makefile.am11
-rw-r--r--ruby/Rakefile.in2
-rwxr-xr-xruby/run-bindtests2
-rwxr-xr-xruby/run-ruby-tests4
4 files changed, 10 insertions, 9 deletions
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index 757855a0..8139140a 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -49,14 +49,15 @@ TESTS = run-bindtests run-ruby-tests
TESTS_ENVIRONMENT = \
LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
LIBGUESTFS_PATH=$(top_builddir)/appliance \
- TMPDIR=$(top_builddir)
+ TMPDIR=$(top_builddir) \
+ RUBY=$(RUBY)
all: $(generator_built)
- rake build
- rake rdoc
+ $(RAKE) build
+ $(RAKE) rdoc
-RUBY_SITELIB := $(shell ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
-RUBY_SITEARCH := $(shell ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
+RUBY_SITELIB := $(shell $(RUBY) -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
+RUBY_SITEARCH := $(shell $(RUBY) -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
install:
$(MKDIR_P) $(DESTDIR)$(RUBY_SITELIB)
diff --git a/ruby/Rakefile.in b/ruby/Rakefile.in
index f4bf9015..9ae993bc 100644
--- a/ruby/Rakefile.in
+++ b/ruby/Rakefile.in
@@ -38,7 +38,7 @@ CLOBBER.include [ "@builddir@/config.save", "@builddir@/ext/**/mkmf.log",
# Build locally
file MAKEFILE => EXT_CONF do |t|
- unless sh "top_srcdir=$(pwd)/@top_srcdir@; top_builddir=$(pwd)/@top_builddir@; export ARCHFLAGS=\"-arch $(uname -m)\"; mkdir -p @builddir@/ext/guestfs; cd @builddir@/ext/guestfs; ruby #{EXT_CONF} --with-_guestfs-include=$top_srcdir/src --with-_guestfs-lib=$top_builddir/src/.libs"
+ unless sh "top_srcdir=$(pwd)/@top_srcdir@; top_builddir=$(pwd)/@top_builddir@; export ARCHFLAGS=\"-arch $(uname -m)\"; mkdir -p @builddir@/ext/guestfs; cd @builddir@/ext/guestfs; @RUBY@ #{EXT_CONF} --with-_guestfs-include=$top_srcdir/src --with-_guestfs-lib=$top_builddir/src/.libs"
$stderr.puts "Failed to run extconf"
break
end
diff --git a/ruby/run-bindtests b/ruby/run-bindtests
index 4cac863e..aafcfbae 100755
--- a/ruby/run-bindtests
+++ b/ruby/run-bindtests
@@ -18,5 +18,5 @@
set -e
-ruby -I${srcdir}/lib -Iext/guestfs ${srcdir}/bindtests.rb > bindtests.tmp
+$RUBY -I${srcdir}/lib -Iext/guestfs ${srcdir}/bindtests.rb > bindtests.tmp
diff -u ${srcdir}/../bindtests bindtests.tmp
diff --git a/ruby/run-ruby-tests b/ruby/run-ruby-tests
index e21899a5..c618241f 100755
--- a/ruby/run-ruby-tests
+++ b/ruby/run-ruby-tests
@@ -22,6 +22,6 @@ set -e
# is bound to fail because they all use a single test image file).
for f in tests/tc_*.rb; do
- echo rake test "$@" TEST="$f"
- rake test "$@" TEST="$f"
+ echo $RAKE test "$@" TEST="$f"
+ $RAKE test "$@" TEST="$f"
done