public
Description: Rubinius, the Ruby VM
Homepage: http://rubini.us
Clone URL: git://github.com/evanphx/rubinius.git
rubinius / doc / build_system.txt
100644 58 lines (42 sloc) 2.517 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Rubinius Build System
 
TODO: Many details are missing.
 
Rubinius uniformly uses Rake as the build system for its own files. However
Rubinius also includes the source for several external libraries and these
typically use makefiles.
 
## Development versus Install Builds
 
Rubinius is comprised of the executable and various support files like the core
and standard libraries. The executable needs to know where to find these files
even if moved to a different location. To handle this problem, Rubinius
distinguishes two build types: development and install. The executable stores
the full path to its base directory, relative to which it expects to find the
files it needs.
 
The development executable stores the path to the source directory in which it
was built. You can then move the executable to a different location but as you
make changes to the core library files in the kernel/\*\* directories, the
executable will continue to use those files.
 
The install executable stores the path to the install directory. Again, even if
the executable is moved to a new location, it will continue to find the
installed files.
 
This has consequences, of course. If you build a development executable and then
rename your source directory, you will need to rebuild. Likewise, if you build an
install executable and rename the install directory, the executable will *not*
function, *even if the executable is in the directory*. The executable checks a
single, hard-coded path. If this ends up being very painful for some reason,
we'll revise it.
 
## Installing Rubinius
 
As detailed in _Development versus Install Builds_, a specific version of the
Rubinius executable is built to be installed. The install task is a bit of a
kludge because of the way that Rake resolves dependencies.
 
The install task first cleans, then configures, then builds, and finally
installs. However, when Rake begins running, it resolves the dependencies for
build, but the dependencies may already exist, so Rake does not expect to build
them. Then the clean task removes these files. After clean runs, the build task
runs but will fail because dependencies have not been built.
 
To handle this, the install task shells out to another invocation of Rake to
build. It may be possible to force Rake to re-resolve the build dependencies.
However, a better approach may be to convert the build system to Tap (see
http://tap.rubyforge.org).
 
To install Rubinius, run
 
    [sudo] rake install
 
To uninstall Rubinius, run
 
    [sudo] rake uninstall