1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2013-05-23 15:18:05 +00:00
parent d07439d5fd
commit 4ea690ea3b

View file

@ -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)}$/, "")