mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00

* configure.in: save configured load path values into verconf.in. * common.mk (verconf.h): create from verconf.in with shvar_to_cpp.rb. * tool/shvar_to_cpp.rb: turn shell variables into C macros. [Bug #7959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
25 lines
770 B
Ruby
Executable file
25 lines
770 B
Ruby
Executable file
#!/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
|