diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-04-26 09:42:44 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-04-26 09:42:44 +0000 |
commit | e67e5adf4e33b79c3bc2f2c8a8b4a790a88adcf2 (patch) | |
tree | 6ef7eae93ed8a768a02dee1baa8ba80a4425b5e0 /ext/aix_mksym.rb | |
parent | f6e04e38cd1f121111d388865e8b201ea3402452 (diff) |
aix shlib link
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/aix_mksym.rb')
-rw-r--r-- | ext/aix_mksym.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/aix_mksym.rb b/ext/aix_mksym.rb new file mode 100644 index 0000000000..ae7cf4e5d1 --- /dev/null +++ b/ext/aix_mksym.rb @@ -0,0 +1,35 @@ + +def uniq(data) + last=nil + data.delete_if do |name| + if last == name + TRUE + else + last = name + FALSE + end + end +end + +def extract(nm, out) + data = nm.readlines.collect{|line| + line = line.split + case line[1] + when "B", "D" + line[0] + else + next + end + }.compact!.sort! + uniq(data) + exp = open(out, "w") + exp.printf "#!\n" + for line in data + exp.printf "%s\n", line + end + exp.close + nm.close +end +if older("../ruby.imp", "../miniruby") + extract(open("|/usr/ccs/bin/nm -p ../*.o"), "../ruby.imp") +end |