summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-11 15:06:41 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-11 15:06:41 +0000
commit1e09355e88d29299153c37c62d92980b9eb6ed66 (patch)
tree8f474c452875b9af03ead334b7e96259015dae36
parentce14c2c061952f713fb8d16ed5bc7f54d16b9fd9 (diff)
merges r22441 from trunk into ruby_1_9_1.
-- * template/fake.rb.in: extracted from Makefile.in. * configure.in (fake.rb): prefixed with $(arch)-. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in20
-rw-r--r--configure.in2
-rw-r--r--template/fake.rb.in15
4 files changed, 26 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index f2726d9d3f..c68f827e93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Feb 19 15:47:11 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * template/fake.rb.in: extracted from Makefile.in.
+
+ * configure.in (fake.rb): prefixed with $(arch)-.
+
Sun Apr 26 20:21:39 2009 NARUSE, Yui <naruse@ruby-lang.org>
* .gitignore: added.
diff --git a/Makefile.in b/Makefile.in
index b59b0cbb9e..b0da254c71 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -28,6 +28,7 @@ datadir = @datadir@
arch = @arch@
sitearch = @sitearch@
sitedir = @sitedir@
+ruby_version = @ruby_version@
TESTUI = console
TESTS =
@@ -152,22 +153,9 @@ $(LIBRUBY_SO):
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
-fake.rb: Makefile
- @echo ' \
- class Object; \
- CROSS_COMPILING = RUBY_PLATFORM; \
- remove_const :RUBY_PLATFORM; \
- remove_const :RUBY_VERSION; \
- RUBY_PLATFORM = "@arch@"; \
- RUBY_VERSION = "@MAJOR@.@MINOR@.@TEENY@"; \
- end; \
- if RUBY_PLATFORM =~ /mswin|bccwin|mingw/; \
- class File; \
- remove_const :ALT_SEPARATOR; \
- ALT_SEPARATOR = "\\"; \
- end; \
- end; \
- ' > $@
+fake: $(arch)-fake.rb
+$(arch)-fake.rb: config.status
+ @./config.status --file=$@:$(srcdir)/template/fake.rb.in
Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in
diff --git a/configure.in b/configure.in
index 3b79bec801..0529f42054 100644
--- a/configure.in
+++ b/configure.in
@@ -1670,7 +1670,7 @@ fi
if test x"$cross_compiling" = xyes; then
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake"
- PREP=fake.rb
+ PREP='$(arch)-fake.rb'
RUNRUBY='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
else
MINIRUBY='./miniruby$(EXEEXT) -I$(srcdir)/lib'
diff --git a/template/fake.rb.in b/template/fake.rb.in
new file mode 100644
index 0000000000..ed9416a16f
--- /dev/null
+++ b/template/fake.rb.in
@@ -0,0 +1,15 @@
+class Object
+ CROSS_COMPILING = RUBY_PLATFORM
+ remove_const :RUBY_PLATFORM
+ 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}]"
+end
+if RUBY_PLATFORM =~ /mswin|bccwin|mingw/
+ class File
+ remove_const :ALT_SEPARATOR
+ ALT_SEPARATOR = "\\"
+ end
+end