diff options
author | H_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-11 01:27:48 +0000 |
---|---|---|
committer | H_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-11 01:27:48 +0000 |
commit | d0b3651906aa943423e430a61437a42f7dd39422 (patch) | |
tree | 9d8c8beee149c50f44406ee8cd6dee4c3913c28f /bcc32/mkexports.rb | |
parent | ceade7b9268e9620b123843afeb25a7136f8a576 (diff) |
new platform [bccwin32] merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bcc32/mkexports.rb')
-rw-r--r-- | bcc32/mkexports.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bcc32/mkexports.rb b/bcc32/mkexports.rb new file mode 100644 index 0000000000..46edf190ee --- /dev/null +++ b/bcc32/mkexports.rb @@ -0,0 +1,26 @@ +#!./miniruby -s + +SYM = {} +objs = ARGV.collect {|s| s.tr('/', '\\')} +system("tdump -oiPUBDEF -oiPUBD32 #{objs.join(' ')} > pub.def") + +IO.foreach('pub.def'){|l| + next unless /(PUBDEF|PUBD32)/ =~ l + /'(.*?)'/ =~ l + SYM[$1] = true +} + +exports = [] +if $name + exports << "Name " + $name +elsif $library + exports << "Library " + $library +end +exports << "Description " + $description.dump if $description +exports << "EXPORTS" << SYM.keys.sort + +if $output + open($output, 'w') {|f| f.puts exports.join("\n")} +else + puts exports.join("\n") +end |