Stupid mkmf

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.

···

On Tue, Feb 3, 2009 at 11:54 PM, Alex Katebi <alex.katebi@gmail.com> 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?

--
Pozdrawiam

Radosław Bułat
http://radarek.jogger.pl - mój blog

> 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 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

···

2009/2/3 Radosław Bułat <radek.bulat@gmail.com>

On Tue, Feb 3, 2009 at 11:54 PM, Alex Katebi <alex.katebi@gmail.com> > wrote:

--
Pozdrawiam

Radosław Bułat
http://radarek.jogger.pl - mój blog

$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!

···

2009/2/4 Alex Katebi <alex.katebi@gmail.com>:

2009/2/3 Radosław Bułat <radek.bulat@gmail.com>

--
Pozdrawiam

Radosław Bułat
http://radarek.jogger.pl - mój blog

Radosław Bułat wrote:

···

2009/2/4 Alex Katebi <alex.katebi@gmail.com>:

2009/2/3 Radosław Bułat <radek.bulat@gmail.com>

$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!

What ever happened to mkrf?

http://rubyforge.org/projects/mkrf/

--
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407