diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-12 03:19:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-12 03:19:57 +0000 |
commit | 6132ed31fb0d1dfb3aaa19b896d5cd0f6ecdce07 (patch) | |
tree | 5b59ce8049d02391baaacdf89f6bf9b8ba5d02ee | |
parent | 16b7b1fb958e295b29e431bd080a0d2e3a69cd8c (diff) |
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/extmk.rb | 2 | ||||
-rw-r--r-- | lib/mkmf.rb | 15 |
3 files changed, 18 insertions, 3 deletions
@@ -1,6 +1,6 @@ Mon Jan 12 12:07:22 2004 Dave Thomas <dave@pragprog.com> - * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_methods): + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_methods): Someone changed the "// in eval.c" comments to "/*...*/" style, so the parsing of the source file name broke. @@ -12,7 +12,7 @@ Mon Jan 12 12:07:22 2004 Dave Thomas <dave@pragprog.com> and all intervening code was included in the following method's documentation. - * lib/rdoc/ri/ri_formatter.rb (RI::HtmlFormatter::break_to_newline): + * lib/rdoc/ri/ri_formatter.rb (RI::HtmlFormatter::break_to_newline): HTML formats need explicit line breaks. Mon Jan 12 11:46:30 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> diff --git a/ext/extmk.rb b/ext/extmk.rb index fe777a4ceb..4e7af05ba0 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -109,7 +109,7 @@ def extmake(target) $extpath ||= [] $extflags += " " + $DLDFLAGS unless $DLDFLAGS.empty? $extflags += " " + $LDFLAGS unless $LDFLAGS.empty? - $extlibs |= $libs.split | $LOCAL_LIBS.split + $extlibs = merge_libs($extlibs, $libs.split, $LOCAL_LIBS.split) $extpath |= $LIBPATH end ensure diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 2a0adab739..e6d4c18177 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -113,6 +113,21 @@ def modified?(target, times) t if times.all? {|n| n <= t} end +def merge_libs(*libs) + libs.inject([]) do |x, y| + xy = x & y + xn = yn = 0 + y.each_with_index do |v, yi| + if xy.include?(v) + xi = [x.index(v), xn].max() + x[xi, 1] = y[yn..yi] + xn, yn = xi + (yi - yn + 1), yi + 1 + end + end + x.concat(y[yn..-1] || []) + end +end + module Logging @log = nil @logfile = 'mkmf.log' |