From feacd3c2e077e26c266d8f3f6bafad2be71a72d2 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 24 Sep 2010 16:34:56 +0000 Subject: * Makefile.in (install-cross): target to install cross-compiling stuff. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ Makefile.in | 23 +++++++++++++++++++++++ common.mk | 1 + configure.in | 6 ++++++ 4 files changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3ae63e7d70..41aac3c2e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Sep 25 01:34:41 2010 Nobuyoshi Nakada + + * Makefile.in (install-cross): target to install cross-compiling + stuff. + Fri Sep 24 23:44:59 2010 Nobuyoshi Nakada * string.c (sym_call), vm.c (invoke_block_from_c), diff --git a/Makefile.in b/Makefile.in index dec77c924b..f00eade968 100644 --- a/Makefile.in +++ b/Makefile.in @@ -79,6 +79,13 @@ MINIRUBY = @MINIRUBY@\ $(MINIRUBYOPT) RUNRUBY = @RUNRUBY@ $(RUNRUBYOPT) -- XRUBY = @XRUBY@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +XRUBY_LIBDIR = @XRUBY_LIBDIR@ +XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ +XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ #### End of system configuration section. #### @@ -170,6 +177,22 @@ $(arch)-fake.rb: config.status $(srcdir)/template/fake.rb.in @./config.status --file=$@:$(srcdir)/template/fake.rb.in @chmod +x $@ +install-cross: $(arch)-fake.rb $(RBCONFIG) rbconfig.rb $(arch_hdrdir)/ruby/config.h \ + $(LIBRUBY_A) $(LIBRUBY_SO) $(ARCHFILE) + $(MAKEDIRS) $(XRUBY_RUBYLIBDIR)/$(arch) $(XRUBY_RUBYHDRDIR)/$(arch)/ruby + sed '/^\$$:\.unshift/q' $(arch)-fake.rb > fake.rb + $(BASERUBY) -p \ + -e '~/^\s*CONFIG\["LDFLAGS"\]/ and' \ + -e '$$_[/(?=\s*"$$)/] = %q[ #{(CONFIG["LIBPATHFLAG"]%File.dirname(__FILE__)).strip}]' \ + rbconfig.rb > fake-rbconfig.rb + $(INSTALL_SCRIPT) fake.rb $(XRUBY_RUBYLIBDIR)/$(arch)/fake.rb + $(INSTALL_SCRIPT) fake-rbconfig.rb $(XRUBY_RUBYLIBDIR)/$(arch)/rbconfig.rb + @$(RM) fake.rb fake-rbconfig.rb + $(INSTALL_DATA) $(arch_hdrdir)/ruby/config.h $(XRUBY_RUBYHDRDIR)/$(arch)/ruby + $(INSTALL_DATA) $(top_srcdir)/include/ruby/win32.h $(XRUBY_RUBYHDRDIR)/ruby + $(INSTALL_DATA) $(LIBRUBY) $(LIBRUBY_A) $(XRUBY_RUBYLIBDIR)/$(arch) + $(INSTALL_PROGRAM) $(LIBRUBY_SO) $(XRUBY_RUBYLIBDIR)/$(arch) + Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in $(MKFILES): config.status diff --git a/common.mk b/common.mk index 34aa182a9a..4cc746d2de 100644 --- a/common.mk +++ b/common.mk @@ -858,6 +858,7 @@ help: PHONY @echo " benchmark benchmark this ruby and COMPARE_RUBY" @echo " install: install all ruby distributions" @echo " install-nodoc: install without rdoc" + @echo " install-cross: install cross compiling staff" @echo " clean: clean for tarball" @echo " distclean: clean for repo" @echo " change: make change log template" diff --git a/configure.in b/configure.in index 2d522a1a2b..5a29f2cb84 100644 --- a/configure.in +++ b/configure.in @@ -2053,6 +2053,12 @@ fi if test x"$cross_compiling" = xyes; then test x"$MINIRUBY" = x && MINIRUBY="${RUBY-$BASERUBY} -I`pwd` "-r'$(arch)-fake' + XRUBY_LIBDIR=`${RUBY-$BASERUBY} -rrbconfig -e ['puts RbConfig::CONFIG["libdir"]']` + XRUBY_RUBYLIBDIR=`${RUBY-$BASERUBY} -rrbconfig -e ['puts RbConfig::CONFIG["rubylibdir"]']` + XRUBY_RUBYHDRDIR=`${RUBY-$BASERUBY} -rrbconfig -e ['puts RbConfig::CONFIG["rubyhdrdir"]']` + AC_SUBST(XRUBY_LIBDIR) + AC_SUBST(XRUBY_RUBYLIBDIR) + AC_SUBST(XRUBY_RUBYHDRDIR) PREP='$(arch)-fake.rb' RUNRUBY='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`' XRUBY='$(MINIRUBY)' -- cgit v1.2.3