[前][次][番号順一覧][スレッド一覧]

ruby-changes:12869

From: nobu <ko1@a...>
Date: Fri, 21 Aug 2009 07:15:12 +0900 (JST)
Subject: [ruby-changes:12869] Ruby:r24602 (trunk): * configure.in (RUBY_PROGRAM_VERSION, RUBY_RELEASE_DATE): extracts

nobu	2009-08-21 07:14:58 +0900 (Fri, 21 Aug 2009)

  New Revision: 24602

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24602

  Log:
    * 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.

  Modified files:
    trunk/configure.in
    trunk/template/fake.rb.in

Index: configure.in
===================================================================
--- configure.in	(revision 24601)
+++ configure.in	(revision 24602)
@@ -84,6 +84,10 @@
 AC_SUBST(MAJOR)
 AC_SUBST(MINOR)
 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
   AC_DEFINE(CANONICALIZATION_FOR_MATHN)
 fi
Index: template/fake.rb.in
===================================================================
--- template/fake.rb.in	(revision 24601)
+++ template/fake.rb.in	(revision 24602)
@@ -4,8 +4,8 @@
   remove_const :RUBY_VERSION
   remove_const :RUBY_DESCRIPTION if defined?(RUBY_DESCRIPTION)
   RUBY_PLATFORM = "@arch@"
-  RUBY_VERSION = "@MAJOR@.@MINOR@.@TEENY@"
-  RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (#{Time.now.strftime("%Y-%m-%d")}) [#{RUBY_PLATFORM}]"
+  RUBY_VERSION = "@RUBY_PROGRAM_VERSION@"
+  RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (@RUBY_RELEASE_DATE@) [#{RUBY_PLATFORM}]"
 end
 if RUBY_PLATFORM =~ /mswin|bccwin|mingw/
   class File

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]