diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-16 08:12:50 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-16 08:12:50 +0000 |
commit | e3fb4697ac95d0e29795afabbe4dd22b1873dd5f (patch) | |
tree | c02c5f64c249fa35d394e4fa9ba8c83edd22c032 | |
parent | b433f167b4810ba1e1117ac151141cdf30ce2a5f (diff) |
merge revision(s) 11594:
* mkconfig.rb: autoconf 2.61 support. [ruby-core:10016]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@17361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | mkconfig.rb | 37 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 37 insertions, 6 deletions
@@ -1,3 +1,7 @@ +Mon Jun 16 17:11:32 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * mkconfig.rb: autoconf 2.61 support. [ruby-core:10016] + Mon Jun 16 15:40:37 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * proc.c (proc_dup): should copy safe_level from src proc diff --git a/mkconfig.rb b/mkconfig.rb index 1f075b0b30..fdc3dcf0af 100644 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -36,12 +36,39 @@ 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(/\\(?=,)/, '') - next if /^(?:ac_.*|DEFS|configure_input)$/ =~ name + 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 next if /^\$ac_\w+$/ =~ val @@ -54,6 +81,7 @@ File.foreach "config.status" do |line| name = "ruby_install_name" val = "ruby".sub(/#{ptn[0]}/, ptn[1]) end + val.gsub!(/ +(?!-)/, "=") if name == "configure_args" && /mswin32/ =~ RUBY_PLATFORM val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump if /^prefix$/ =~ name val = "(TOPDIR || DESTDIR + #{val})" @@ -66,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 @@ -109,7 +135,8 @@ if $so_name v_fast << " CONFIG[\"RUBY_SO_NAME\"] = \"" + $so_name + "\"\n" end -print v_fast, v_others +print(*v_fast) +print(*v_others) print <<EOS CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)" CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)" @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-06-16" #define RUBY_VERSION_CODE 185 #define RUBY_RELEASE_CODE 20080616 -#define RUBY_PATCHLEVEL 221 +#define RUBY_PATCHLEVEL 222 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 |