Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ayumin
Created October 13, 2012 13:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayumin/3884612 to your computer and use it in GitHub Desktop.
Save ayumin/3884612 to your computer and use it in GitHub Desktop.
Setting for Ruby-core developemnt

Setting

git clone git://github.com/ruby/ruby.git
cd ruby
git svn init -s --prefix=origin/ svn+ssh://svn@ci.ruby-lang.org/ruby
git svn fetch

Configure option

--desable-shared

rubyコマンドのほとんどをダイナミック リンクライブラリ(libruby.so)として外に出すオプション。EWS4800など一部のプラットホームでは必須。必須でないプラットホームでも --enable-shared を付けておくと eruby や mod_ruby を作るときにダイナミックリンクになるので便利。 (でなければスタティックリンクになる)

--prefix=<path>

インストール先をで指定したパスにする。デフォルトは/usr/local

Build

autoconf

CC=clang ./configure --prefix=/Users/ayumin/temp/ruby \
  --with-arch=x86_64 \
  --with-readline-dir=/usr/local/Cellar/readline/6.2.4 \
  --with-gdbm-dir=/usr/local/Cellar/gdbm/1.10 \
  --with-openssl-dir=/usr/local/Cellar/openssl/1.0.1c \
  --with-libyaml-dir=/usr/local/Cellar/libyaml/0.1.4

make
make test
make test-all TESTS='-v -p -j 6'
make update-mspec
make update-rubyspec
make test-rubyspec

buildscript

#!/bin/bash

PWD=`pwd`
REPOSITORY=`basename ${PWD}`
INSTALL_DIR=/Users/ayumin/temp/${REPOSITORY}
READLINE_DIR=/usr/local/Cellar/readline/6.2.4
GDBM_DIR=/usr/local/Cellar/gdbm/1.10
OPENSSL_DIR=/usr/local/Cellar/openssl/1.0.1c
LIBYAML_DIR=/usr/local/Cellar/libyaml/0.1.4

if [ -d ${INSTALL_DIR} ]; then
  rm -rf ${INSTALL_DIR};
fi

if [ -f ./Makefile ]; then
  make realclean;
fi

autoconf;

CC=clang ./configure --prefix=${INSTALL_DIR} \
  --with-arch=x86_64 \
  --with-readline-dir=${READLINE_DIR} \
  --with-gdbm-dir=${GDBM_DIR} \
  --with-openssl-dir=${OPENSSL_DIR} \
  --with-libyaml-dir=${LIBYAML_DIR};

make;
make test;
# make test-all TESTS='-v -p -j 6'
# make update-mspec
# make update-rubyspec
# make test-rubyspec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment