1 # Compiles the extension used in the subtend specs
3 def compile_extension(name)
4 path = File.dirname(__FILE__) + '/ext/'
5 ext = "#{path}#{name}.#{Config::CONFIG['DLEXT']}"
6 ext_source = "#{path}#{name}.c"
7 if !File.exists?(ext) or File.mtime(ext) < File.mtime(ext_source)
8 if Object.constants.include? 'Rubinius'
9 system "./shotgun/rubinius compile #{ext_source} -g > /dev/null"
12 system "#{c['LDSHARED']} -g #{ext_source} -I #{c['archdir']} #{c['SOLIBS']} #{c['LIBRUBYARG_SHARED']} -o #{ext} > /dev/null"