summaryrefslogtreecommitdiff
path: root/tool/shvar_to_cpp.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-16 04:13:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-16 04:13:40 +0000
commit434f0abd0290cc5f1f59ad8fd146e43a8ebd42bd (patch)
tree9abb3cb46afc0ca05d22eb21352ab6d689417dbf /tool/shvar_to_cpp.rb
parentae9dbb6ce1aca03a8d35c7e1afd1011bc9b52caf (diff)
verconf.h.in: template for verconf.h
* template/verconf.h.in: generate verconf.h from the template and rbconfig.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/shvar_to_cpp.rb')
-rwxr-xr-xtool/shvar_to_cpp.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/tool/shvar_to_cpp.rb b/tool/shvar_to_cpp.rb
deleted file mode 100755
index 79764e9..0000000
--- a/tool/shvar_to_cpp.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/ruby
-
-require './rbconfig'
-C = RbConfig::MAKEFILE_CONFIG.dup
-C["ruby_version"] = '"RUBY_LIB_VERSION"'
-C["arch"] = '"arch"'
-C["sitearch"] = '"arch"'
-C["vendorarchdir"] = '"RUBY_VENDOR_ARCH_LIB"'
-C["sitearchdir"] = '"RUBY_SITE_ARCH_LIB"'
-C["vendorlibdir"] = '"RUBY_VENDOR_LIB2"'
-C["sitelibdir"] = '"RUBY_SITE_LIB2"'
-C["vendordir"] = '"RUBY_VENDOR_LIB"'
-C["sitedir"] = '"RUBY_SITE_LIB"'
-C["rubylibdir"] = '"RUBY_LIB"'
-C["rubylibprefix"] = '"RUBY_LIB_PREFIX"'
-C["rubyarchprefix"] = '"RUBY_ARCH_PREFIX_FOR(arch)"'
-C["rubysitearchprefix"] = '"RUBY_SITEARCH_PREFIX_FOR(arch)"'
-C["exec_prefix"] = '"RUBY_EXEC_PREFIX"'
-
-verconf = File.read(ARGV[0])
-verconf.gsub!(/^(#define\s+\S+\s+)(.*)/) {
- $1 + RbConfig.expand($2, C).gsub(/^""(?!$)|(.)""$/, '\1')
-}
-
-puts verconf