From: Logan Capaldo Date: 2006-03-08T12:17:03+09:00 Subject: Re: Adding a compile rule to mkmf.rb On Mar 7, 2006, at 10:04 PM, Gerardo Santana G�mez Garrido wrote: > I want to write an extconf.rb file for a Ruby extension. The problem > is that my source file has a suffix that is not any of the expected by > mkmf.rb: ec. The suffixes expected are: > > SRC_EXT = ["c", "cc", "m", "cxx", "cpp", "C"] > > I could add the suffix: > > SRC_EXT << "ec" > > and even define my own COMPILE_EC rule: > > COMPILE_EC = '$(ESQL) $(CFLAGS) -c $<' > > but how can I extend create_makefile to use this rule, without > modifying mkmf.rb? > > -- > Gerardo Santana > "Between individuals, as between nations, respect for the rights of > others is peace" - Don Benito Ju�rez > http://santanatechnotes.blogspot.com/ > I don't think you can :(. I just looked at mkmf, and it looks like the only way to make an extension for ruby as far as mkmf is concerned with C or C++. mkmf doesn't really look for anything dynamically, those constants seem to be more to save typing than anything else. :( It's too bad, it would be neat if mkmf was extendable in this manner.