1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2015-03-07 02:06:24 +00:00
parent aa68fd85b9
commit cdcae92de9
4 changed files with 6 additions and 26 deletions

View file

@ -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):

View file

@ -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

View file

@ -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)

View file

@ -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 \