diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-07 02:06:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-07 02:06:24 +0000 |
commit | cdcae92de95d553f164351503fbba5488da5c86b (patch) | |
tree | 25d2b5d2130296148d8697281c1e55fba074ff8e | |
parent | aa68fd85b9c760b0281b7be803ae4a5505ca7090 (diff) |
common.mk: same fake.rb
* common.mk (fake.rb): generate from same template on all
platforms including win32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | Makefile.in | 3 | ||||
-rw-r--r-- | common.mk | 5 | ||||
-rw-r--r-- | template/fake.rb.in | 6 | ||||
-rw-r--r-- | win32/Makefile.sub | 18 |
4 files changed, 6 insertions, 26 deletions
diff --git a/Makefile.in b/Makefile.in index 9c8dbced0f..2afea66b8b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -246,9 +246,6 @@ $(LIBRUBY_SO): @-$(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): @@ -549,6 +549,11 @@ fake: $(CROSS_COMPILING)-fake 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 diff --git a/template/fake.rb.in b/template/fake.rb.in index 8e461c57a4..0363b10e83 100644 --- a/template/fake.rb.in +++ b/template/fake.rb.in @@ -19,11 +19,7 @@ class Object 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) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 7d0fbf1b1b..11bcee6e6f 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1056,24 +1056,6 @@ $(RCFILES): $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb -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 \ |