mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* tool/mkconfig.rb: Fix build with m4 1.4.15 generating duplicate
lines in config.status. According to nobu, the mswin32 port may depend on the piece of code in question, so the behavior is left unchanged on mswin32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
08c467330b
commit
a88191b1ca
2 changed files with 17 additions and 11 deletions
|
@ -1,3 +1,10 @@
|
|||
Fri Sep 17 02:18:41 2010 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* tool/mkconfig.rb: Fix build with m4 1.4.15 generating duplicate
|
||||
lines in config.status. According to nobu, the mswin32 port may
|
||||
depend on the piece of code in question, so the behavior is left
|
||||
unchanged on mswin32.
|
||||
|
||||
Thu Sep 16 23:47:59 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/pathname/pathname.c (path_opendir): Pathname#opendir translated
|
||||
|
|
|
@ -35,6 +35,7 @@ module RbConfig
|
|||
]
|
||||
|
||||
arch = RUBY_PLATFORM
|
||||
win32 = /mswin32/ =~ arch
|
||||
v_fast = []
|
||||
v_others = []
|
||||
vars = {}
|
||||
|
@ -51,19 +52,17 @@ File.foreach "config.status" do |line|
|
|||
name = $1
|
||||
val = $2
|
||||
if $3
|
||||
continued_line = []
|
||||
continued_line << val
|
||||
continued_line = [val]
|
||||
continued_name = name
|
||||
next
|
||||
end
|
||||
when /^"(.*)"\s*(\\)?$/
|
||||
if continued_line
|
||||
continued_line << $1
|
||||
next if $2
|
||||
val = continued_line.join("")
|
||||
name = continued_name
|
||||
continued_line = nil
|
||||
end
|
||||
next if !continued_line
|
||||
continued_line << $1
|
||||
next if $2
|
||||
val = continued_line.join
|
||||
name = continued_name
|
||||
continued_line = nil
|
||||
when /^(?:ac_given_)?INSTALL=(.*)/
|
||||
v_fast << " CONFIG[\"INSTALL\"] = " + $1 + "\n"
|
||||
end
|
||||
|
@ -112,14 +111,14 @@ File.foreach "config.status" do |line|
|
|||
end
|
||||
end
|
||||
if name == "configure_args"
|
||||
val.gsub!(/ +(?!-)/, "=") if /mswin32/ =~ RUBY_PLATFORM
|
||||
val.gsub!(/ +(?!-)/, "=") if win32
|
||||
val.gsub!(/--with-out-ext/, "--without-ext")
|
||||
end
|
||||
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
|
||||
if /^prefix$/ =~ name
|
||||
val = "(TOPDIR || DESTDIR + #{val})"
|
||||
end
|
||||
v = " CONFIG[\"#{name}\"] #{vars[name] ? '<< "\n"' : '='} #{val}\n"
|
||||
v = " CONFIG[\"#{name}\"] #{win32 && vars[name] ? '<< "\n"' : '='} #{val}\n"
|
||||
vars[name] = true
|
||||
if fast[name]
|
||||
v_fast << v
|
||||
|
|
Loading…
Reference in a new issue