Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 63 lines (53 sloc) 3.155 kb
84adefa The R13B03 release.
Erlang/OTP authored
1 Notes about prebuilt beam files under version control
2 -----------------------------------------------------
3
4 This information applies mostly to developers, some parts only
5 to developers of the main branch i.e. Ericsson and HiPE personel.
6
7 There are two types of derived code under version control, namely:
8
9 primary bootstrap - Resides in the $ERL_TOP/bootstrap/{lib,bin} directories.
10 preloaded code - Resides in the $ERL_TOP/erts/preloaded directory.
11
12 Primary bootstrap
13 .................
14
15 The two types of version controlled code are fundamentally
16 different. The primary bootstrap is code compiled from source files in
17 the lib/{kernel,stdlib,compiler} (and header files from
18 lib/orber/include. They are checked in in the version control system
19 to make it possible to build directly from the code base tree without
20 the need for an earlier version of the compiler. When a new version of
21 OTP is released, these files are updated manually (or rather, by using
22 the $ERL_TOP/otp_build script) and checked in. The files can also be
23 updated due to changes in the compiler during the development
24 process. The primary bootstrap is always updated as a separate
25 deliberate process, never during a normal development build.
26
27 If a prebuilt open source version of erlang is used, the directory
28 bootstrap initially does not contain any beam files, the directory is
29 instead populated by copying beam files from the
30 $ERL_TOP/lib/{kernel,stdlib,compiler}/ebin directories. This
31 construction is to save space in the distribution, but the result
32 would be the same. Open source developers need not provide patches for
33 the precompiled beam files in the primary bootstrap, the bootstrap
34 update is always performed by the main developers.
35
36 Preloaded code
37 ..............
38
39 The directory $ERL_TOP/preloaded contains both src and ebin
40 subdirectories. The preloaded code is compiled into the virtual
41 machine and always present. When compiling the virtual machine, those
42 beam files need to be present and they are considered a part of the
43 virtual machine rather than a part of the kernel application. When
44 preloaded files are to be updated, the source code is built using a
45 special Makefile in the $ERL_TOP/preloaded/src directory, which
46 creates beam files in the same directory. When they seem to compile
47 successfully, they can be used in an emulator build by being copied
48 to the ebin directory (although, in Clearcase that requires checking
49 out the files in the ebin directory first). For developers using the
50 main Clearcase branch, otp_build {prepare,update,commit}_preloaded can
51 be used to ease the process (there are also similar targets in the
52 $ERL_TOP/preloaded/src/Makefile).
53
54 In prebuilt open source distributions, these .beam files are also
55 present, but to update them one might need to change permission on the
56 $ERL_TOP/preloaded/ebin directory, then build and then manually copy
57 the beam files from the source directory to ../ebin. If patches are
58 created that involve the source files used to build preloaded code,
59 always note this specially as the preloaded/ebin directory needs
60 updating, or provide the new derived files in the patch or as complete
61 binaries.
62
63 /Patrik, OTP
Something went wrong with that request. Please try again.