mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mkconfig.rb: prefer unexpanded values
* tool/mkconfig.rb: prefer configured values than overriding values for RUBY_INSTALL_NAME and RUBY_SO_NAME when expanded results are same. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fe5554af85
commit
07dcd43a0a
1 changed files with 10 additions and 2 deletions
|
@ -42,6 +42,8 @@ v_others = []
|
||||||
vars = {}
|
vars = {}
|
||||||
continued_name = nil
|
continued_name = nil
|
||||||
continued_line = nil
|
continued_line = nil
|
||||||
|
install_name = nil
|
||||||
|
so_name = nil
|
||||||
File.foreach "config.status" do |line|
|
File.foreach "config.status" do |line|
|
||||||
next if /^#/ =~ line
|
next if /^#/ =~ line
|
||||||
name = nil
|
name = nil
|
||||||
|
@ -75,8 +77,8 @@ File.foreach "config.status" do |line|
|
||||||
when /^(?:X|(?:MINI|RUN|BASE)RUBY$)/; next
|
when /^(?:X|(?:MINI|RUN|BASE)RUBY$)/; next
|
||||||
when /^(?:MAJOR|MINOR|TEENY)$/; next
|
when /^(?:MAJOR|MINOR|TEENY)$/; next
|
||||||
when /^LIBRUBY_D?LD/; next
|
when /^LIBRUBY_D?LD/; next
|
||||||
when /^RUBY_INSTALL_NAME$/; next if $install_name
|
when /^RUBY_INSTALL_NAME$/; next vars[name] = (install_name = val).dup if $install_name
|
||||||
when /^RUBY_SO_NAME$/; next if $so_name
|
when /^RUBY_SO_NAME$/; next vars[name] = (so_name = val).dup if $so_name
|
||||||
when /^arch$/; if val.empty? then val = arch else arch = val end
|
when /^arch$/; if val.empty? then val = arch else arch = val end
|
||||||
when /^sitearch$/; val = '$(arch)' if val.empty?
|
when /^sitearch$/; val = '$(arch)' if val.empty?
|
||||||
end
|
end
|
||||||
|
@ -215,10 +217,16 @@ end
|
||||||
v_others.compact!
|
v_others.compact!
|
||||||
|
|
||||||
if $install_name
|
if $install_name
|
||||||
|
if install_name and vars.expand("$(RUBY_INSTALL_NAME)") == $install_name
|
||||||
|
$install_name = install_name
|
||||||
|
end
|
||||||
v_fast << " CONFIG[\"ruby_install_name\"] = \"" + $install_name + "\"\n"
|
v_fast << " CONFIG[\"ruby_install_name\"] = \"" + $install_name + "\"\n"
|
||||||
v_fast << " CONFIG[\"RUBY_INSTALL_NAME\"] = \"" + $install_name + "\"\n"
|
v_fast << " CONFIG[\"RUBY_INSTALL_NAME\"] = \"" + $install_name + "\"\n"
|
||||||
end
|
end
|
||||||
if $so_name
|
if $so_name
|
||||||
|
if so_name and vars.expand("$(RUBY_SO_NAME)") == $so_name
|
||||||
|
$so_name = so_name
|
||||||
|
end
|
||||||
v_fast << " CONFIG[\"RUBY_SO_NAME\"] = \"" + $so_name + "\"\n"
|
v_fast << " CONFIG[\"RUBY_SO_NAME\"] = \"" + $so_name + "\"\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue