summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-12 07:55:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-12 07:55:14 +0000
commitc99884eff7bb9da078b078704f57adb302ea3ff3 (patch)
treed45cc0e09d07ecb54782f6f7bc4ba09df389845d
parent84eb7f643c0b576038ff3a69f79585410d5ec747 (diff)
downloadruby-c99884eff7bb9da078b078704f57adb302ea3ff3.tar.gz
ruby-c99884eff7bb9da078b078704f57adb302ea3ff3.tar.xz
ruby-c99884eff7bb9da078b078704f57adb302ea3ff3.zip
* ext/extmk.rb (extmake): compact $extlibs.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--ext/extmk.rb11
2 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index fc8238896..38b2a4a1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 b5286980a..ae5a33896 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 ".."