How can I get you to use mkrf?

K

Kevin Clark

Hi guys,
Google's Summer of Code has officially come to a close but I in no way
plan to abandon my project. It's in a fairly stable place and working
for the libraries that I've played with. That being said, I don't
think many are using the project. mkmf is old, and though it is ugly,
I expect people are comfortable with it.

What can I do to help you make a switch? What feature does mkmf have
that you -need- for your extension? How can I make this easier?

Finally, speak up if you're already using mkrf or have played with it.
I'm happy to hear criticism.

I hope this thread can give me a list of things to work on as I try to
move the project along.
 
F

Farrel Lifson

Hi guys,
Google's Summer of Code has officially come to a close but I in no way
plan to abandon my project. It's in a fairly stable place and working
for the libraries that I've played with. That being said, I don't
think many are using the project. mkmf is old, and though it is ugly,
I expect people are comfortable with it.

What can I do to help you make a switch? What feature does mkmf have
that you -need- for your extension? How can I make this easier?

Finally, speak up if you're already using mkrf or have played with it.
I'm happy to hear criticism.

I hope this thread can give me a list of things to work on as I try to
move the project along.

Is it a replacement for a tool like rake? If not how easy would it be
to use/integrate with rake?

Farrel
 
R

Robin Stocker

Kevin said:
What can I do to help you make a switch? What feature does mkmf have
that you -need- for your extension? How can I make this easier?

Hi,

I tried it, but it doesn't work with my C++ extension. Though I can
specify '*.cxx' with Mkrf::Generator.new, the resulting Rakefile has no
rule for .cxx and so the rake command just says:

Don't know how to build task 'id3lib_api_wrap.o'

When I manually change '.c' to '.cxx' in the Rakefile, everything works
alright.

This is obviously a "feature" I need ;)

Robin Stocker
 
T

Timothy Hunter

Kevin said:
Hi guys,
Google's Summer of Code has officially come to a close but I in no way
plan to abandon my project. It's in a fairly stable place and working
for the libraries that I've played with. That being said, I don't
think many are using the project. mkmf is old, and though it is ugly,
I expect people are comfortable with it.

What can I do to help you make a switch? What feature does mkmf have
that you -need- for your extension? How can I make this easier?

Finally, speak up if you're already using mkrf or have played with it.
I'm happy to hear criticism.

I hope this thread can give me a list of things to work on as I try to
move the project along.

Were you able to add the features I described in my RubyForge forum post?

http://rubyforge.org/forum/forum.php?thread_id=7096&forum_id=7153
 
K

Kevin Clark

Hi Tim,
Thought it'd be hacky, you can add to vars using the new
additional_code accessor (same with the header flags). I'm not really
satisfied with that either though, so I'm going to be investigating
implementing those features for the next release. You'll -definitely-
have a better way to access LDFLAGS and friends.

Kev
 
K

Kevin Clark

Farrel,
mkrf is for building Rakefiles to build extensions to Ruby. It uses
rake, but isn't a replacement for it. It aims to replace mkmf.

Kev
 
T

Timothy Hunter

Kevin said:
Hi Tim,
Thought it'd be hacky, you can add to vars using the new
.additional_code accessor (same with the header flags). I'm not really
satisfied with that either though, so I'm going to be investigating
implementing those features for the next release. You'll -definitely-
have a better way to access LDFLAGS and friends.

Kev
Thanks for responding, Kevin. How about creating a "config.h" file for
the 100+ feature test preprocessor symbols?
 
K

Kevin Clark

Thanks for responding, Kevin. How about creating a "config.h" file for
the 100+ feature test preprocessor symbols?

Something like that may work. An optional .h file would fix your
issues certainly. I'll see what makes sense in the code.
 
J

John Gabriele

Hi guys,
Google's Summer of Code has officially come to a close but I in no way
plan to abandon my project.

Great. :)
It's in a fairly stable place and working
for the libraries that I've played with. That being said, I don't
think many are using the project. mkmf is old, and though it is ugly,
I expect people are comfortable with it.

What can I do to help you make a switch? What feature does mkmf have
that you -need- for your extension? How can I make this easier?

[snip]
I hope this thread can give me a list of things to work on as I try to
move the project along.

Well, you might make use of rubyforge to set up a mailing list. Then,
after some archives accrete and you have a better idea of what users
want/need, maybe get a tutorial together. That's what I'd like to see.
Also, a basic homepage (even if you just put the README up there)
would be nice.

I'm hoping to use mkrf in the next couple of weeks, but still need to
learn my way around a bit better.

---John
 
K

Kevin Clark

John,
I setup a mailing list at rubyforge just a moment ago. I'll send an
announcment to ruby-talk when it's up and ready to go.

I'll try to get a basic homepage up this week.


Hi guys,
Google's Summer of Code has officially come to a close but I in no way
plan to abandon my project.

Great. :)
It's in a fairly stable place and working
for the libraries that I've played with. That being said, I don't
think many are using the project. mkmf is old, and though it is ugly,
I expect people are comfortable with it.

What can I do to help you make a switch? What feature does mkmf have
that you -need- for your extension? How can I make this easier?

[snip]
I hope this thread can give me a list of things to work on as I try to
move the project along.

Well, you might make use of rubyforge to set up a mailing list. Then,
after some archives accrete and you have a better idea of what users
want/need, maybe get a tutorial together. That's what I'd like to see.
Also, a basic homepage (even if you just put the README up there)
would be nice.

I'm hoping to use mkrf in the next couple of weeks, but still need to
learn my way around a bit better.

---John
 
M

mortench

My MKRF requirements can be translated into the following issue: Can
MKRF make the following ugy mess of a MKMF file easier and more
portable ?

--------------WARNING: UGLY MKMf script below: --------------

# Loads mkmf which is used to make makefiles for Ruby extensions
require 'mkmf'

# Give it a name
extension_name = 'digimarc'

# The destination
dir_config(extension_name)

# Get home directory (unfortunately not portable).
home = ENV["HOME"]

# Setup Digimarc Sdk path, add to includes and link. Assumes the sdk is
in
# a directory called "DigimarcSdk" directly in the user's home
directory but
# this can be overriden using the normal -with-digimarcSdk-include &
# -with-digimarcSdk-lib command line options.
digimarcSdkInclude, digimarcSdkLib = dir_config("digimarcSdk",
home+"/DigimarcSdk/Include", home+"/DigimarcSdk/lib")

# Non-portable way of linking our dynamic extension library with some
static library files
# from digimarc the sdk (".a" on linux). Uses full path since these
files are not affected
# by GCC/g++'s -L path settings.
# BTW: Not sure $LOCAL_LIBS is used correctly here but it works.
staticLibs = ["libBitmapIO", "libDWMEmb", "libDWMRdr", "libIWMPCom",
"libIWMRdr"]
staticLibExtension = ".a"
staticLibs.each { |x| $LOCAL_LIBS = $LOCAL_LIBS + " " + digimarcSdkLib
+ "/" + x + staticLibExtension}

# Non-portable way of specifying a C++ linker as required by Digimarc.
CONFIG['LDSHARED']="g++ -shared"

# Defines that os-specific flags that the digimarc SDK uses (also
non-portable)
$CFLAGS=$CFLAGS+" -D\"UNIX=1\""

# Create our makefile.
create_makefile(extension_name)

---------------------------------------------------------------

Cheers,
Morten


Kevin Clark skrev:
 
K

Kevin Clark

Morten,
Almost certainly. If you want to contact me off list I may be able to
help test mkrf with your library.
Kev

My MKRF requirements can be translated into the following issue: Can
MKRF make the following ugy mess of a MKMF file easier and more
portable ?

--------------WARNING: UGLY MKMf script below: --------------

# Loads mkmf which is used to make makefiles for Ruby extensions
require 'mkmf'

# Give it a name
extension_name = 'digimarc'

# The destination
dir_config(extension_name)

# Get home directory (unfortunately not portable).
home = ENV["HOME"]

# Setup Digimarc Sdk path, add to includes and link. Assumes the sdk is
in
# a directory called "DigimarcSdk" directly in the user's home
directory but
# this can be overriden using the normal -with-digimarcSdk-include &
# -with-digimarcSdk-lib command line options.
digimarcSdkInclude, digimarcSdkLib = dir_config("digimarcSdk",
home+"/DigimarcSdk/Include", home+"/DigimarcSdk/lib")

# Non-portable way of linking our dynamic extension library with some
static library files
# from digimarc the sdk (".a" on linux). Uses full path since these
files are not affected
# by GCC/g++'s -L path settings.
# BTW: Not sure $LOCAL_LIBS is used correctly here but it works.
staticLibs = ["libBitmapIO", "libDWMEmb", "libDWMRdr", "libIWMPCom",
"libIWMRdr"]
staticLibExtension = ".a"
staticLibs.each { |x| $LOCAL_LIBS = $LOCAL_LIBS + " " + digimarcSdkLib
+ "/" + x + staticLibExtension}

# Non-portable way of specifying a C++ linker as required by Digimarc.
CONFIG['LDSHARED']="g++ -shared"

# Defines that os-specific flags that the digimarc SDK uses (also
non-portable)
$CFLAGS=$CFLAGS+" -D\"UNIX=1\""

# Create our makefile.
create_makefile(extension_name)

---------------------------------------------------------------

Cheers,
Morten


Kevin Clark skrev:
 
T

Trans

Kevin said:
Hi guys,
Google's Summer of Code has officially come to a close but I in no way
plan to abandon my project. It's in a fairly stable place and working
for the libraries that I've played with. That being said, I don't
think many are using the project. mkmf is old, and though it is ugly,
I expect people are comfortable with it.

What can I do to help you make a switch? What feature does mkmf have
that you -need- for your extension? How can I make this easier?

Finally, speak up if you're already using mkrf or have played with it.
I'm happy to hear criticism.

I hope this thread can give me a list of things to work on as I try to
move the project along.

I would love to support it in my new build/task system to be release in
the next few days. I'm not a C coder myself, but if we could work
together on that, it would be great.

T.
 
N

nobu

Hi,

At Wed, 23 Aug 2006 09:00:03 +0900,
mortench wrote in [ruby-talk:210014]:
# Non-portable way of linking our dynamic extension library with some
static library files
# from digimarc the sdk (".a" on linux). Uses full path since these
files are not affected
# by GCC/g++'s -L path settings.
# BTW: Not sure $LOCAL_LIBS is used correctly here but it works.
staticLibs = ["libBitmapIO", "libDWMEmb", "libDWMRdr", "libIWMPCom",
"libIWMRdr"]
staticLibExtension = ".a"
staticLibs.each { |x| $LOCAL_LIBS = $LOCAL_LIBS + " " + digimarcSdkLib
+ "/" + x + staticLibExtension}

mkmf support static libraries, of course,

by just

[BitmapIO DWMEmb DWMRdr IWMPCom libIWMRdr].each {|lib| have_library(lib)}
 

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,164
Messages
2,570,901
Members
47,439
Latest member
elif2sghost

Latest Threads

Top