diff --git a/EN/2_mri_structure.md b/EN/2_mri_structure.md index d59b580..53a18b1 100644 --- a/EN/2_mri_structure.md +++ b/EN/2_mri_structure.md @@ -26,13 +26,13 @@ We assume the use of the following directory structure: * `build/` <- build directory (`*.o` files and other compilation artifacts are stored here) * `install/` <- install directory (`workdir/install/bin/ruby` is the installed binary) -The commands `git`, `ruby`, `autoconf`, `bison`, `gcc` (or `clang`, etc), and `make` are required. +The commands `git`, `ruby`, `autoconf`, `gcc` (or `clang`, etc), and `make` are required. Standard Ruby extensions (such as zlib, openssl, etc.) will be built if the libraries they depend on are available. If you use `apt-get` (or `apt`) for package management in your environment, then you can get all dependencies with the following command: ``` -$ sudo apt-get install git ruby autoconf bison gcc make zlib1g-dev libffi-dev libreadline-dev libgdbm-dev libssl-dev libyaml-dev +$ sudo apt-get install git ruby autoconf gcc make zlib1g-dev libffi-dev libreadline-dev libgdbm-dev libssl-dev libyaml-dev ``` If you would like to install other than `apt-get`, see for example [Home · rbenv/ruby\-build Wiki](https://github.com/rbenv/ruby-build/wiki) @@ -178,14 +178,14 @@ There are two kinds of libraries. ## Ruby's build process -Ruby build process is composed of several phases involving source code generation and so on. Several tools are written in Ruby, so the Ruby build process requires the Ruby interpreter. Release tarballs contain generated source code so that installing Ruby with a release tarball does not require the Ruby interpreter (and other development tools such as bison). +Ruby build process is composed of several phases involving source code generation and so on. Several tools are written in Ruby, so the Ruby build process requires the Ruby interpreter. Release tarballs contain generated source code so that installing Ruby with a release tarball does not require the Ruby interpreter (and other development tools such as autoconf). If you want to build MRI with source code fetched by Subversion or Git repository, you need a Ruby interpreter. The following steps describe the build and install process: 1. Build miniruby - 1. parse.y -> parse.c: Compile syntax rules into C code with bison + 1. parse.y -> parse.c: Compile syntax rules into C code with lrama 2. insns.def -> vm.inc: Compile VM instructions into C code with ruby (`BASERUBY`) 3. `*.c` -> `*.o` (`*.obj` on Windows): Compile C code into object files. 4. link object files into miniruby diff --git a/JA/2_mri_structure.md b/JA/2_mri_structure.md index 89da3d8..01c727c 100644 --- a/JA/2_mri_structure.md +++ b/JA/2_mri_structure.md @@ -25,12 +25,12 @@ MRI のソースコードの構造について紹介します。また、Ruby 前提とするコマンド: -git、ruby、autoconf、bison、gcc (or clang, etc)、make が必須です。その他、依存ライブラリがあれば、拡張ライブラリが作成されます。 +git、ruby、autoconf、gcc (or clang, etc)、make が必須です。その他、依存ライブラリがあれば、拡張ライブラリが作成されます。 `apt-get` が使える環境では、下記のようなコマンドでインストールされます。 ``` -$ sudo apt-get install git ruby autoconf bison gcc make zlib1g-dev libffi-dev libreadline-dev libgdbm-dev libssl-dev libyaml-dev +$ sudo apt-get install git ruby autoconf gcc make zlib1g-dev libffi-dev libreadline-dev libgdbm-dev libssl-dev libyaml-dev ``` `apt-get` 以外でインストールしたい場合は、例えば [Home · rbenv/ruby\-build Wiki](https://github.com/rbenv/ruby-build/wiki) を参照してみてください。 @@ -233,14 +233,14 @@ Ruby のソースコードを修正すると、C プログラムなので容易 ## Ruby のビルドプロセス -Ruby のビルドでは、ソースコードを生成しながらビルドを進めていきます。ソースコードを生成するいくつかのツールは Ruby を用いるため、Ruby のビルドには Ruby が必要になります。ソースコード配布用の tar ball には、これら生成されたソースコードもあわせて配布しているので、tar ball を用いるのであれば、Ruby のビルドに Ruby (や、その他 bison などの外部ツール)は不要です。 +Ruby のビルドでは、ソースコードを生成しながらビルドを進めていきます。ソースコードを生成するいくつかのツールは Ruby を用いるため、Ruby のビルドには Ruby が必要になります。ソースコード配布用の tar ball には、これら生成されたソースコードもあわせて配布しているので、tar ball を用いるのであれば、Ruby のビルドに Ruby (や、その他 autoconf などの外部ツール)は不要です。 -逆に言うと、Subversion や Git リポジトリからソースコードを取得した場合は、Ruby インタプリタ(や、bison などの外部ツール)が必要になります。 +逆に言うと、Subversion や Git リポジトリからソースコードを取得した場合は、Ruby インタプリタ(や、autoconf などの外部ツール)が必要になります。 ビルド・インストールは、次のように進みます(要するに、`make all` がやっていること)。 1. miniruby のビルド - 1. parse.y -> parse.c: Compile syntax rules to C code by bison + 1. parse.y -> parse.c: Compile syntax rules to C code by lrama 2. insns.def -> vm.inc: Compile VM instructions to C code by ruby (`BASERUBY`) 3. `*.c` -> `*.o` (`*.obj` on Windows): Compile C codes to object files. 4. link object files into miniruby diff --git a/docker/Dockerfile.bionic b/docker/Dockerfile.bionic index 056c6ba..22ad90c 100644 --- a/docker/Dockerfile.bionic +++ b/docker/Dockerfile.bionic @@ -4,7 +4,7 @@ MAINTAINER Koichi Sasada RUN apt update && \ apt dist-upgrade -y && \ apt install -y gcc && \ - apt install -y ruby subversion autoconf bison make git && \ + apt install -y ruby subversion autoconf make git && \ apt install -y libgmp-dev libssl-dev zlib1g-dev libffi-dev libreadline-dev libgdbm-dev && \ apt install -y vim-tiny gdb && \ apt install -y sudo && \