mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* mkconfig.rb: autoconf 2.61 support. [ruby-core:10016]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dbee7c9072
commit
bfc2a070b1
2 changed files with 32 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Jan 30 12:05:35 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* mkconfig.rb: autoconf 2.61 support. [ruby-core:10016]
|
||||
|
||||
Mon Jan 29 23:52:32 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* tool/compile.rb: replace YARVCore by VM class.
|
||||
|
|
31
mkconfig.rb
31
mkconfig.rb
|
@ -36,11 +36,38 @@ v_fast = []
|
|||
v_others = []
|
||||
vars = {}
|
||||
has_version = false
|
||||
continued_name = nil
|
||||
continued_line = nil
|
||||
File.foreach "config.status" do |line|
|
||||
next if /^#/ =~ line
|
||||
if /^s([%,])@(\w+)@\1(?:\|\#_!!_\#\|)?(.*)\1/ =~ line
|
||||
name = nil
|
||||
case line
|
||||
when /^s([%,])@(\w+)@\1(?:\|\#_!!_\#\|)?(.*)\1/
|
||||
name = $2
|
||||
val = $3.gsub(/\\(?=,)/, '')
|
||||
when /^S\["(\w+)"\]\s*=\s*"(.*)"\s*(\\)?$/
|
||||
name = $1
|
||||
val = $2
|
||||
if $3
|
||||
continued_line = []
|
||||
continued_line << val
|
||||
continued_name = name
|
||||
next
|
||||
end
|
||||
when /^"(.+)"\s*(\\)?$/
|
||||
if continued_line
|
||||
continued_line << $1
|
||||
unless $2
|
||||
val = continued_line.join("")
|
||||
name = continued_name
|
||||
continued_line = nil
|
||||
end
|
||||
end
|
||||
when /^(?:ac_given_)?INSTALL=(.*)/
|
||||
v_fast << " CONFIG[\"INSTALL\"] = " + $1 + "\n"
|
||||
end
|
||||
|
||||
if name
|
||||
next if /^(?:ac_.*|DEFS|configure_input|(?:top_)?srcdir|\w+OBJS)$/ =~ name
|
||||
next if /^\$\(ac_\w+\)$/ =~ val
|
||||
next if /^\$\{ac_\w+\}$/ =~ val
|
||||
|
@ -67,8 +94,6 @@ File.foreach "config.status" do |line|
|
|||
v_others << v
|
||||
end
|
||||
has_version = true if name == "MAJOR"
|
||||
elsif /^(?:ac_given_)?INSTALL=(.*)/ =~ line
|
||||
v_fast << " CONFIG[\"INSTALL\"] = " + $1 + "\n"
|
||||
end
|
||||
# break if /^CEOF/
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue