Hi, I am writing a C extension but I want to include some classes written in pure ruby. How can I package the pure ruby files so that it is install when the user runs ruby extconf.rb && make && make install Thanks Paul
Hi, I am writing a C extension but I want to include some classes written in pure ruby. How can I package the pure ruby files so that it is install when the user runs ruby extconf.rb && make && make install Thanks Paul
You can use Minero Aoki's install.rb * put extconf.rb + sources in ext/extname/ * create a MANIFEST file in ext/extname, containing the names of all files in that dir * put the .rb files in lib/ Add README, TODO, LICENSE, etc in the top dir (and install.rb of course :) and you have a nice 'standard' package. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Win95 is not a virus; a virus does something. -- unknown source
How would I do that? Thanks very much for your help Paul
>>>>> "m" == maillist@bestworldweb homelinux com < XXXX@XXXXX.COM > writes: m> How would I do that? svg% ls -R .: extconf.rb lib/ test.c test.rb* ./lib: b.rb* svg% svg% ruby extconf.rb creating Makefile svg% svg% make gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/local/lib/ruby/1.8/i686-linux -I. -c test.c gcc -shared -L"/usr/local/lib" -o mytest.so test.o -ldl -lcrypt -lm -lc svg% svg# make install mytest.so -> /usr/local/lib/ruby/site_ruby/1.8/i686-linux/mytest.so chmod 0755 /usr/local/lib/ruby/site_ruby/1.8/i686-linux/mytest.so ./lib/b.rb -> /usr/local/lib/ruby/site_ruby/1.8/b.rb chmod 0644 /usr/local/lib/ruby/site_ruby/1.8/b.rb svg# Guy Decoux
Guy, Thanks VERY much for all your help and examples. Best regards Paul
http://www.**--****.com/ -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Try to remove the color-problem by restarting your computer several times. -- Microsoft-Internet Explorer README.TXT
Thanks very much for your kind help. Best Regards Paul
1.Using mkmf.rb / extconf.rb and autoconf/automake together
2.Using extconf.rb for executables?
Hi! I recently had an efficency problem with a small tool to be used with a Ruby program. To improve efficency I did re-write the tool in C. That immediately brought up the question if one can use exconf.rb not only to create libraries but also for executables. I didn't find any hint concerning that question. Is it possilble? How? Wouldn't it be nice if it *were* possible? Is there an alternative? I know that autoconf & Co. exist but they require tools that are not necessarily available on machines that have Ruby. The solution should not require more than Ruby, C and make (or nmake). I presently use a Makefile but Makefiles are not the answer to portability issues. Josef 'Jupp' Schugt -- .-------. message > 100 kB? / | | sender = spammer? / | R.I.P.| text = spam? / ___| |___
3.Installing .h files from extconf.rb?
Hey, anyone have an elegant way they use to make extconf (with the possible addition of install.rb) install C headers? I need to have one installed, since I'm working on two modules, and one uses the other, and needs to access the data structures. thanks, -- Ryan Pavlik < XXXX@XXXXX.COM > "And let's not forget the smell!" - 8BT
4.[Ruby Forum] Ruby extconf.rb / autoconf (in?)compatibility
5.ruby 1.8.0 preview4 (Bug in ext/openssl/extconf.rb)
On Fri, Jul 25, 2003 at 02:22:52PM +0000, Mike wrote: > A one-line patch for 'extconf.rb' follows. > > 105c105 > < if try_cpp("#define FOO(a, ...) foo(a, ##__VA_ARGS__)\n int x() { FOO(1,2); } > ") > --- > > if try_cpp("#define FOO(a, ...) foo(a, ##__VA_ARGS__)\n") That's backwards, yes? Didn't you add the call to FOO rather than removing it? -Mark
6. Ruby extconf.rb / autoconf (in?)compatibility
7. mysql-ruby installation - extconf.rb:33: uninitialized constant CPP (NameError)
Users browsing this forum: No registered users and 21 guest