stupid mkmf

A

Alex Katebi

[Note: parts of this message were removed to make it a legal post.]

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

Rados³aw Bu³at

The mkmf gets the list of C source files to be used for the shared librar= y
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 =3D [
# c files listed here
]
$objs =3D [
# 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.

--=20
Pozdrawiam

Rados=B3aw Bu=B3at
http://radarek.jogger.pl - m=F3j blog
 
A

Alex Katebi

2009/2/3 Rados=B3aw Bu=B3at said:
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 =3D [
# c files listed here
]
$objs =3D [
# object files listed here
]

I assume I should do something like $srcs =3D %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
 
R

Rados³aw Bu³at

2009/2/4 Alex Katebi said:
2009/2/3 Rados=B3aw Bu=B3at said:
$srcs =3D [
# c files listed here
]
$objs =3D [
# object files listed here
]

I assume I should do something like $srcs =3D %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!

--=20
Pozdrawiam

Rados=B3aw Bu=B3at
http://radarek.jogger.pl - m=F3j blog
 
J

Joel VanderWerf

Rados³aw Bu³at said:
2009/2/4 Alex Katebi said:
2009/2/3 Rados³aw Bu³at said:
$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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,968
Members
47,517
Latest member
TashaLzw39

Latest Threads

Top