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

ruby-changes:37803

From: nobu <ko1@a...>
Date: Sat, 7 Mar 2015 11:06:38 +0900 (JST)
Subject: [ruby-changes:37803] nobu:r49884 (trunk): common.mk: same fake.rb

nobu	2015-03-07 11:06:24 +0900 (Sat, 07 Mar 2015)

  New Revision: 49884

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

  Log:
    common.mk: same fake.rb
    
    * common.mk (fake.rb): generate from same template on all
      platforms including win32.

  Modified files:
    trunk/Makefile.in
    trunk/common.mk
    trunk/template/fake.rb.in
    trunk/win32/Makefile.sub
Index: common.mk
===================================================================
--- common.mk	(revision 49883)
+++ common.mk	(revision 49884)
@@ -549,6 +549,11 @@ fake: $(CROSS_COMPILING)-fake https://github.com/ruby/ruby/blob/trunk/common.mk#L549
 yes-fake: $(arch)-fake.rb $(RBCONFIG) PHONY
 no-fake: PHONY
 
+$(arch)-fake.rb: $(RBCONFIG) $(srcdir)/template/fake.rb.in $(srcdir)/tool/expand-config.rb rbconfig.rb
+	@$(BOOTSTRAPRUBY) $(srcdir)/tool/expand-config.rb \
+		-output=$@ -mode=$(INSTALL_PROG_MODE) -expand -config=rbconfig.rb \
+		srcdir="$(srcdir)" BASERUBY="$(BASERUBY)" $(srcdir)/template/fake.rb.in
+
 btest: $(TEST_RUNNABLE)-btest
 no-btest: PHONY
 yes-btest: fake miniruby$(EXEEXT) PHONY
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub	(revision 49883)
+++ win32/Makefile.sub	(revision 49884)
@@ -1056,24 +1056,6 @@ $(RCFILES): $(RBCONFIG) $(srcdir)/revisi https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1056
 			-so_name=$(RUBY_SO_NAME) \
 			. $(icondirs) $(win_srcdir)
 
-$(arch)-fake.rb: $(MKFILES) $(srcdir)/version.h
-	@echo Creating <<$@
-class Object
-  remove_const :CROSS_COMPILING if defined?(CROSS_COMPILING)
-  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 = $(RUBY_PROGRAM_VERSION)
-  RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (" $(RUBY_RELEASE_DATE) ") [#{RUBY_PLATFORM}]"
-end
-class File
-  remove_const :ALT_SEPARATOR
-  ALT_SEPARATOR = "\\"
-end
-<<KEEP
-
 $(ruby_pc): $(RBCONFIG)
 	@$(BOOTSTRAPRUBY) $(srcdir)/tool/expand-config.rb \
 		-output=$@ -mode=$(INSTALL_DATA_MODE) -config=rbconfig.rb \
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 49883)
+++ Makefile.in	(revision 49884)
@@ -246,9 +246,6 @@ $(LIBRUBY_SO): https://github.com/ruby/ruby/blob/trunk/Makefile.in#L246
 		@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link rescue nil; \
 						  File.symlink "$(LIBRUBY_SO)", link}' \
 				$(LIBRUBY_ALIASES) || true
-$(arch)-fake.rb: config.status $(srcdir)/template/fake.rb.in
-		@./config.status --file=$@:$(srcdir)/template/fake.rb.in
-		@chmod +x $@
 
 ruby_pc = @ruby_pc@
 $(ruby_pc):
Index: template/fake.rb.in
===================================================================
--- template/fake.rb.in	(revision 49883)
+++ template/fake.rb.in	(revision 49884)
@@ -19,11 +19,7 @@ class Object https://github.com/ruby/ruby/blob/trunk/template/fake.rb.in#L19
   RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
 end
 builddir = File.dirname(__FILE__)
-top_srcdir = "@abs_top_srcdir@"
-if /mingw/ =~ RUBY_PLATFORM
-  # convert MSYS path to Windows path
-  top_srcdir.sub!(/\A\/([a-z])\//, '\\1:/')
-end
+top_srcdir = File.join(builddir, "@srcdir@")
 $:.unshift(File.expand_path(builddir))
 fake = File.join(top_srcdir, "tool/fake.rb")
 eval(File.read(fake), nil, fake)

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

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