diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-12 07:55:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-12 07:55:14 +0000 |
commit | cc4f2f8fcb6cdc7175eaa65242ebe87285c154c9 (patch) | |
tree | d45cc0e09d07ecb54782f6f7bc4ba09df389845d | |
parent | d43d26f25208ce6e54e3e0076154568e5e434c2c (diff) |
* ext/extmk.rb (extmake): compact $extlibs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/extmk.rb | 11 |
2 files changed, 8 insertions, 7 deletions
@@ -1,10 +1,12 @@ -Tue Aug 12 11:12:42 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> +Tue Aug 12 16:55:11 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> * Makefile.in: static link libraries to LIBRUBY_SO with static linked ext. [ruby-dev:21157] * ext/extmk.rb (extmake): sort extension library initialization order. + * ext/extmk.rb (extmake): compact $extlibs. + Tue Aug 12 02:48:56 2003 Yukihiro Matsumoto <matz@ruby-lang.org> * eval.c (THREAD_SAVE_CONTEXT): should explicitly turn off the diff --git a/ext/extmk.rb b/ext/extmk.rb index b5286980a7..ae5a338961 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -101,12 +101,11 @@ def extmake(target) end if $static $extflags ||= "" - $extlibs ||= "" + $extlibs ||= [] $extpath ||= [] $extflags += " " + $DLDFLAGS unless $DLDFLAGS.empty? $extflags += " " + $LDFLAGS unless $LDFLAGS.empty? - libs = ($libs.split+$LOCAL_LIBS.split).uniq - $extlibs = [$extlibs, *libs].join(" ") unless libs.empty? + $extlibs |= $libs.split | $LOCAL_LIBS.split $extpath |= $LIBPATH end ensure @@ -254,13 +253,13 @@ SRC $extobjs = "ext/extinit.#{$OBJEXT} " + $extobjs if RUBY_PLATFORM =~ /m68k-human|beos/ - $extlibs.gsub!("-L/usr/local/lib", "") if $extlibs + $extflags.delete("-L/usr/local/lib") end $extpath.delete("$(topdir)") $extflags = libpathflag($extpath) << " " << $extflags.strip conf = [ ['SETUP', $setup], [$enable_shared ? 'DLDOBJS' : 'EXTOBJS', $extobjs], - ['EXTLIBS', $extlibs], ['EXTLDFLAGS', $extflags] + ['EXTLIBS', $extlibs.join(' ')], ['EXTLDFLAGS', $extflags] ].map {|n, v| "#{n}=#{v}" if v and !(v = v.strip).empty? }.compact @@ -270,7 +269,7 @@ SRC end rubies = [] %w[RUBY RUBYW].each {|r| - r = CONFIG[r+"_INSTALL_NAME"] and !r.empty? and rubies << r+EXEEXT + config_string(r+"_INSTALL_NAME") {|r| l << r+EXEEXT} } Dir.chdir ".." |