* configure.in (RUBY_PROGRAM_VERSION, RUBY_RELEASE_DATE): extracts

from version.h for cross-compiling.

* template/fake.rb.in (RUBY_VERSION, RUBY_DESCRIPTION): use above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-08-20 22:14:58 +00:00
Родитель e22b92dce4
Коммит 7439c06ab7
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -84,6 +84,10 @@ done
AC_SUBST(MAJOR) AC_SUBST(MAJOR)
AC_SUBST(MINOR) AC_SUBST(MINOR)
AC_SUBST(TEENY) AC_SUBST(TEENY)
RUBY_PROGRAM_VERSION=`sed -n 's/^#define RUBY_VERSION "\(.*\)"/\1/p' $srcdir/version.h`
AC_SUBST(RUBY_PROGRAM_VERSION)
RUBY_RELEASE_DATE=`sed -n 's/^#define RUBY_RELEASE_DATE "\(.*\)"/\1/p' $srcdir/version.h`
AC_SUBST(RUBY_RELEASE_DATE)
if test "$MAJOR" = "1"; then if test "$MAJOR" = "1"; then
AC_DEFINE(CANONICALIZATION_FOR_MATHN) AC_DEFINE(CANONICALIZATION_FOR_MATHN)
fi fi

Просмотреть файл

@ -4,8 +4,8 @@ class Object
remove_const :RUBY_VERSION remove_const :RUBY_VERSION
remove_const :RUBY_DESCRIPTION if defined?(RUBY_DESCRIPTION) remove_const :RUBY_DESCRIPTION if defined?(RUBY_DESCRIPTION)
RUBY_PLATFORM = "@arch@" RUBY_PLATFORM = "@arch@"
RUBY_VERSION = "@MAJOR@.@MINOR@.@TEENY@" RUBY_VERSION = "@RUBY_PROGRAM_VERSION@"
RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (#{Time.now.strftime("%Y-%m-%d")}) [#{RUBY_PLATFORM}]" RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (@RUBY_RELEASE_DATE@) [#{RUBY_PLATFORM}]"
end end
if RUBY_PLATFORM =~ /mswin|bccwin|mingw/ if RUBY_PLATFORM =~ /mswin|bccwin|mingw/
class File class File