Forum: Ruby stupid mkmf

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Alex K. (Guest)
on 2009-02-04 00:55
(Received via mailing list)
The mkmf gets the list of C source files to be used for the shared
library
from the current directory only.
Is this the only stupid way to list C source files for ruby extensions?
Radosław B. (Guest)
on 2009-02-04 03:32
(Received via mailing list)
On Tue, Feb 3, 2009 at 11:54 PM, Alex K. <removed_email_address@domain.invalid>
wrote:
> The mkmf gets the list of C source files to be used for the shared library
> from the current directory only.
> Is this the only stupid way to list C source files for ruby extensions?
>
I remember doing something like this in extconf.rb:

$srcs = [
  # c files listed here
]
$objs = [
  # object files listed here
]

I looked at the mkmf sources and see that it use that global variables
but I don't know if there is better way. Btw. mkmf source is very
poor.. it would be nice to have better replacement for mkmf.

--
Pozdrawiam

Rados³aw Bu³at
http://radarek.jogger.pl - mój blog
Alex K. (Guest)
on 2009-02-04 15:35
(Received via mailing list)
2009/2/3 Radosław Bułat <removed_email_address@domain.invalid>

>  # c files listed here
> ]
> $objs = [
>  # object files listed here
> ]
>

I assume I should do something like $srcs = %w[../src/foo.c
../src/more.c]


>
> I looked at the mkmf sources and see that it use that global variables
> but I don't know if there is better way. Btw. mkmf source is very
> poor.. it would be nice to have better replacement for mkmf.


If I have some time in the future I will write an autoconf & automake
replacement for mkmf and give it to Matz.  Ruby deserves better than
this
mkmf hack.

Thanks for responding!
-Alex
Radosław B. (Guest)
on 2009-02-04 18:59
(Received via mailing list)
2009/2/4 Alex K. <removed_email_address@domain.invalid>:
> 2009/2/3 Rados³aw Bu³at <removed_email_address@domain.invalid>
>> $srcs = [
>>  # c files listed here
>> ]
>> $objs = [
>>  # object files listed here
>> ]
>>
>
> I assume I should do something like $srcs = %w[../src/foo.c ../src/more.c]

Yes.

> If I have some time in the future I will write an autoconf & automake
> replacement for mkmf and give it to Matz.  Ruby deserves better than this
> mkmf hack.

Ruby gives big possibility to build nice api and mkmf is just ugly
(both from programmer and source perspective).
Good luck!

--
Pozdrawiam

Rados³aw Bu³at
http://radarek.jogger.pl - mój blog
Joel VanderWerf (Guest)
on 2009-02-04 19:05
(Received via mailing list)
Rados³aw Bu³at wrote:
>
> Yes.
>
>> If I have some time in the future I will write an autoconf & automake
>> replacement for mkmf and give it to Matz.  Ruby deserves better than this
>> mkmf hack.
>
> Ruby gives big possibility to build nice api and mkmf is just ugly
> (both from programmer and source perspective).
> Good luck!
>

What ever happened to mkrf?

http://rubyforge.org/projects/mkrf/
This topic is locked and can not be replied to.