summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-23 15:18:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-23 15:18:05 +0000
commit4ea690ea3b19680ef168f5b32d7a132cc4d05a5c (patch)
tree3ac050124d3783b82519025c34ba568110ec87c5
parentd07439d5fdbcec497dc251c5c4e77d1660cd195b (diff)
extmk.rb: don't duplicate
* ext/extmk.rb (extract_makefile): do not add dldflags if duplicated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rwxr-xr-xext/extmk.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 9521e6ca0a..eda487c30e 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -105,7 +105,9 @@ def extract_makefile(makefile, keep = true)
/^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = false
end
$preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "")
- $DLDFLAGS += " " + (m[/^dldflags[ \t]*=[ \t]*(.*)/, 1] || "")
+ if dldflags = m[/^dldflags[ \t]*=[ \t]*(.*)/, 1] and !$DLDFLAGS.include?(dldflags)
+ $DLDFLAGS += " " + dldflags
+ end
if s = m[/^LIBS[ \t]*=[ \t]*(.*)/, 1]
s.sub!(/^#{Regexp.quote($LIBRUBYARG)} */, "")
s.sub!(/ *#{Regexp.quote($LIBS)}$/, "")