Permalink
Browse files

Ruby: fix build

Also, per the usual convention, do not bake the binary as part of
the package, leave it to the user to choose the components.
  • Loading branch information...
anttikantee committed Aug 16, 2016
1 parent 50757cb commit 54ec653b27c6bfe368f61be955b1cf7197a140b1
Showing with 8 additions and 3 deletions.
  1. +3 −3 ruby/Makefile
  2. +5 −0 ruby/README.md
View
@@ -9,11 +9,11 @@ endif
all: bin/ruby images/usr.iso
-bin/ruby: build/ruby
+bin/ruby: build/rubydist/usr/bin/ruby
mkdir -p bin
- rumprun-bake hw_generic bin/ruby.bin build/rubydist/bin/ruby
+ cp $< $@
-build/ruby: build/Makefile
+build/rubydist/usr/bin/ruby: build/Makefile
(cd build; \
./configure --enable-static --disable-shared --host=$(RUMPRUN_TOOLCHAIN_TUPLE) --with-static-linked-ext --prefix=/usr --disable-install-doc --with-out-ext=-test* LDFLAGS="-Bstatic -static"; \
$(MAKE) --debug; make install DESTDIR=rubydist)
View
@@ -15,6 +15,11 @@ Example
```
make
make images/examples.iso
+```
+
+Bake the target binary as usual, e.g. `rumprun-bake hw_generic bin/ruby.bin bin/ruby`
+
+```
rumprun qemu -g'-nographic -vga none' -i -e GEM_HOME=/examples/gems/ruby/2.2.0 -b images/usr.iso,/usr -b images/examples.iso,/examples bin/ruby.bin -I/usr/lib/ruby/2.2.0/ -I/usr/lib/ruby/2.2.0/x86_64-netbsd/ /examples/test_sinatra.rb -o 0.0.0.0
```

0 comments on commit 54ec653

Please sign in to comment.