From bf52a8b6c44a32a1e251ddc1dbb6904f4f6c6f87 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 5 Dec 2015 08:48:28 +0000 Subject: Fix cross build * tool/fake.rb: Fix cross build when srcdir is an absolute path. * Makefile.in: PREP dependency is needed when cross build too, not "-r$(arch)-fake" to be used before created. [Fix GH-1125] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ Makefile.in | 2 +- tool/fake.rb | 3 ++- win32/Makefile.sub | 2 -- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75f5f6f23e..759aa06e44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Dec 5 17:48:25 2015 Lars Kanis + + * tool/fake.rb: Fix cross build when srcdir is an absolute path. + + * Makefile.in: PREP dependency is needed when cross build too, not + "-r$(arch)-fake" to be used before created. [Fix GH-1125] + Sat Dec 5 17:26:24 2015 Nobuyoshi Nakada * hash.c (env_str_new, env_path_str_new): make default string diff --git a/Makefile.in b/Makefile.in index 91bc8fc45e..4ae4596f13 100644 --- a/Makefile.in +++ b/Makefile.in @@ -258,7 +258,7 @@ ruby-runner.c: template/ruby-runner.c.in ruby-runner$(EXEEXT): ruby-runner.c $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(RUBY_INSTALL_NAME) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ ruby-runner.c -$(RBCONFIG): $($(CROSS_COMPILING:no=)PREP) +$(RBCONFIG): $(PREP) rbconfig.rb: $(RBCONFIG) diff --git a/tool/fake.rb b/tool/fake.rb index 9fe95a5bd6..353a7b7035 100644 --- a/tool/fake.rb +++ b/tool/fake.rb @@ -46,7 +46,8 @@ prehook = proc do |extmk| end join = proc {|*args| File.join(*args).sub!(/\A(?:\.\/)*/, '')} $topdir ||= builddir - $top_srcdir ||= join[$topdir, srcdir] + $top_srcdir ||= (File.identical?(top_srcdir, dir = join[$topdir, srcdir]) ? + dir : top_srcdir) $extout = '$(topdir)/.ext' $extout_prefix = '$(extout)$(target_prefix)/' config = RbConfig::CONFIG diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 751cdb24ea..60f2e23b2d 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1061,9 +1061,7 @@ clean-enc distclean-enc realclean-enc: @-$(MAKE) -f $(ENC_MK) $(MFLAGS) V=$(V) $(@:-enc=) !endif -!if "$(CROSS_COMPILING)" == "no" $(RBCONFIG): $(PREP) -!endif $(RCFILES): $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb @$(MINIRUBY) $(srcdir)/win32/resource.rb \ -- cgit v1.2.3