Module: PullCode
- Defined in:
- ext/lapack/extconf.rb
Class Method Summary collapse
Class Method Details
.pull(sofile, *reps) ⇒ Object
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'ext/lapack/extconf.rb', line 240 def self.pull(sofile, *reps) `nm -D #{sofile}`.each { |line| line =~ %r!U (\w+)! next unless $1 func = $1 reps.each { |d| d = d.sub %r!/$!, "" [ "#{d}/#{func}.c", d + "/" + func.sub(%r!_$!, "") + ".c", ].each { |fname| if FileTest.exist? fname FileUtils.cp fname, "." puts "-->copied #{fname}" break end } } } end |