Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

The R13B03 release.

  • Loading branch information...
0 parents commit 84adefa331c4159d432d22840663c38f155cd4c1 Erlang/OTP committed
Showing with 30,788 additions and 0 deletions.
  1. +23 −0 .gitignore
  2. +13 −0 AUTHORS
  3. +286 −0 EPLICENCE
  4. +813 −0
  5. +472 −0 README
  6. +63 −0 README.bootstrap
  7. +749 −0 README.win32
  8. +16 −0 TAR.include
  9. 0  bin/.gitignore
  10. BIN  bootstrap/bin/start.boot
  11. +113 −0 bootstrap/bin/start.script
  12. BIN  bootstrap/bin/start_clean.boot
  13. +113 −0 bootstrap/bin/start_clean.script
  14. BIN  bootstrap/lib/compiler/ebin/beam_asm.beam
  15. BIN  bootstrap/lib/compiler/ebin/beam_block.beam
  16. BIN  bootstrap/lib/compiler/ebin/beam_bool.beam
  17. BIN  bootstrap/lib/compiler/ebin/beam_bsm.beam
  18. BIN  bootstrap/lib/compiler/ebin/beam_clean.beam
  19. BIN  bootstrap/lib/compiler/ebin/beam_dead.beam
  20. BIN  bootstrap/lib/compiler/ebin/beam_dict.beam
  21. BIN  bootstrap/lib/compiler/ebin/beam_disasm.beam
  22. BIN  bootstrap/lib/compiler/ebin/beam_flatten.beam
  23. BIN  bootstrap/lib/compiler/ebin/beam_jump.beam
  24. BIN  bootstrap/lib/compiler/ebin/beam_listing.beam
  25. BIN  bootstrap/lib/compiler/ebin/beam_opcodes.beam
  26. BIN  bootstrap/lib/compiler/ebin/beam_peep.beam
  27. BIN  bootstrap/lib/compiler/ebin/beam_trim.beam
  28. BIN  bootstrap/lib/compiler/ebin/beam_type.beam
  29. BIN  bootstrap/lib/compiler/ebin/beam_utils.beam
  30. BIN  bootstrap/lib/compiler/ebin/beam_validator.beam
  31. BIN  bootstrap/lib/compiler/ebin/cerl.beam
  32. BIN  bootstrap/lib/compiler/ebin/cerl_clauses.beam
  33. BIN  bootstrap/lib/compiler/ebin/cerl_inline.beam
  34. BIN  bootstrap/lib/compiler/ebin/cerl_trees.beam
  35. BIN  bootstrap/lib/compiler/ebin/compile.beam
  36. +66 −0 bootstrap/lib/compiler/ebin/
  37. +1 −0  bootstrap/lib/compiler/ebin/compiler.appup
  38. BIN  bootstrap/lib/compiler/ebin/core_lib.beam
  39. BIN  bootstrap/lib/compiler/ebin/core_lint.beam
  40. BIN  bootstrap/lib/compiler/ebin/core_parse.beam
  41. BIN  bootstrap/lib/compiler/ebin/core_pp.beam
  42. BIN  bootstrap/lib/compiler/ebin/core_scan.beam
  43. BIN  bootstrap/lib/compiler/ebin/erl_bifs.beam
  44. BIN  bootstrap/lib/compiler/ebin/rec_env.beam
  45. BIN  bootstrap/lib/compiler/ebin/sys_core_dsetel.beam
  46. BIN  bootstrap/lib/compiler/ebin/sys_core_fold.beam
  47. BIN  bootstrap/lib/compiler/ebin/sys_core_inline.beam
  48. BIN  bootstrap/lib/compiler/ebin/sys_expand_pmod.beam
  49. BIN  bootstrap/lib/compiler/ebin/sys_pre_attributes.beam
  50. BIN  bootstrap/lib/compiler/ebin/sys_pre_expand.beam
  51. BIN  bootstrap/lib/compiler/ebin/v3_codegen.beam
  52. BIN  bootstrap/lib/compiler/ebin/v3_core.beam
  53. BIN  bootstrap/lib/compiler/ebin/v3_kernel.beam
  54. BIN  bootstrap/lib/compiler/ebin/v3_kernel_pp.beam
  55. BIN  bootstrap/lib/compiler/ebin/v3_life.beam
  56. +311 −0 bootstrap/lib/compiler/egen/beam_opcodes.erl
  57. +12 −0 bootstrap/lib/compiler/egen/beam_opcodes.hrl
  58. +5,221 −0 bootstrap/lib/compiler/egen/core_parse.erl
  59. BIN  bootstrap/lib/kernel/ebin/application.beam
  60. BIN  bootstrap/lib/kernel/ebin/application_controller.beam
  61. BIN  bootstrap/lib/kernel/ebin/application_master.beam
  62. BIN  bootstrap/lib/kernel/ebin/application_starter.beam
  63. BIN  bootstrap/lib/kernel/ebin/auth.beam
  64. BIN  bootstrap/lib/kernel/ebin/code.beam
  65. BIN  bootstrap/lib/kernel/ebin/code_server.beam
  66. BIN  bootstrap/lib/kernel/ebin/disk_log.beam
  67. BIN  bootstrap/lib/kernel/ebin/disk_log_1.beam
  68. BIN  bootstrap/lib/kernel/ebin/disk_log_server.beam
  69. BIN  bootstrap/lib/kernel/ebin/disk_log_sup.beam
  70. BIN  bootstrap/lib/kernel/ebin/dist_ac.beam
  71. BIN  bootstrap/lib/kernel/ebin/dist_util.beam
  72. BIN  bootstrap/lib/kernel/ebin/erl_boot_server.beam
  73. BIN  bootstrap/lib/kernel/ebin/erl_ddll.beam
  74. BIN  bootstrap/lib/kernel/ebin/erl_distribution.beam
  75. BIN  bootstrap/lib/kernel/ebin/erl_epmd.beam
  76. BIN  bootstrap/lib/kernel/ebin/erl_reply.beam
  77. BIN  bootstrap/lib/kernel/ebin/error_handler.beam
  78. BIN  bootstrap/lib/kernel/ebin/error_logger.beam
  79. BIN  bootstrap/lib/kernel/ebin/erts_debug.beam
  80. BIN  bootstrap/lib/kernel/ebin/file.beam
  81. BIN  bootstrap/lib/kernel/ebin/file_io_server.beam
  82. BIN  bootstrap/lib/kernel/ebin/file_server.beam
  83. BIN  bootstrap/lib/kernel/ebin/gen_sctp.beam
  84. BIN  bootstrap/lib/kernel/ebin/gen_tcp.beam
  85. BIN  bootstrap/lib/kernel/ebin/gen_udp.beam
  86. BIN  bootstrap/lib/kernel/ebin/global.beam
  87. BIN  bootstrap/lib/kernel/ebin/global_group.beam
  88. BIN  bootstrap/lib/kernel/ebin/global_search.beam
  89. BIN  bootstrap/lib/kernel/ebin/group.beam
  90. BIN  bootstrap/lib/kernel/ebin/heart.beam
  91. BIN  bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
  92. BIN  bootstrap/lib/kernel/ebin/inet.beam
  93. BIN  bootstrap/lib/kernel/ebin/inet6_sctp.beam
  94. BIN  bootstrap/lib/kernel/ebin/inet6_tcp.beam
  95. BIN  bootstrap/lib/kernel/ebin/inet6_tcp_dist.beam
  96. BIN  bootstrap/lib/kernel/ebin/inet6_udp.beam
  97. BIN  bootstrap/lib/kernel/ebin/inet_config.beam
  98. BIN  bootstrap/lib/kernel/ebin/inet_db.beam
  99. BIN  bootstrap/lib/kernel/ebin/inet_dns.beam
  100. BIN  bootstrap/lib/kernel/ebin/inet_gethost_native.beam
  101. BIN  bootstrap/lib/kernel/ebin/inet_hosts.beam
  102. BIN  bootstrap/lib/kernel/ebin/inet_parse.beam
  103. BIN  bootstrap/lib/kernel/ebin/inet_res.beam
  104. BIN  bootstrap/lib/kernel/ebin/inet_sctp.beam
  105. BIN  bootstrap/lib/kernel/ebin/inet_tcp.beam
  106. BIN  bootstrap/lib/kernel/ebin/inet_tcp_dist.beam
  107. BIN  bootstrap/lib/kernel/ebin/inet_udp.beam
  108. +120 −0 bootstrap/lib/kernel/ebin/
  109. +1 −0  bootstrap/lib/kernel/ebin/kernel.appup
  110. BIN  bootstrap/lib/kernel/ebin/kernel.beam
  111. BIN  bootstrap/lib/kernel/ebin/kernel_config.beam
  112. BIN  bootstrap/lib/kernel/ebin/net.beam
  113. BIN  bootstrap/lib/kernel/ebin/net_adm.beam
  114. BIN  bootstrap/lib/kernel/ebin/net_kernel.beam
  115. BIN  bootstrap/lib/kernel/ebin/os.beam
  116. BIN  bootstrap/lib/kernel/ebin/packages.beam
  117. BIN  bootstrap/lib/kernel/ebin/pg2.beam
  118. BIN  bootstrap/lib/kernel/ebin/ram_file.beam
  119. BIN  bootstrap/lib/kernel/ebin/rpc.beam
  120. BIN  bootstrap/lib/kernel/ebin/seq_trace.beam
  121. BIN  bootstrap/lib/kernel/ebin/standard_error.beam
  122. BIN  bootstrap/lib/kernel/ebin/user.beam
  123. BIN  bootstrap/lib/kernel/ebin/user_drv.beam
  124. BIN  bootstrap/lib/kernel/ebin/user_sup.beam
  125. BIN  bootstrap/lib/kernel/ebin/wrap_log_reader.beam
  126. 0  bootstrap/lib/kernel/egen/.gitignore
  127. +70 −0 bootstrap/lib/kernel/include/file.hrl
  128. +36 −0 bootstrap/lib/kernel/include/inet.hrl
  129. +247 −0 bootstrap/lib/kernel/include/inet_sctp.hrl
  130. +66 −0 bootstrap/lib/orber/include/Makefile
  131. +148 −0 bootstrap/lib/orber/include/corba.hrl
  132. +72 −0 bootstrap/lib/orber/include/ifr_types.hrl
  133. +76 −0 bootstrap/lib/orber/include/orber_pi.hrl
  134. BIN  bootstrap/lib/stdlib/ebin/array.beam
  135. BIN  bootstrap/lib/stdlib/ebin/base64.beam
  136. BIN  bootstrap/lib/stdlib/ebin/beam_lib.beam
  137. BIN  bootstrap/lib/stdlib/ebin/c.beam
  138. BIN  bootstrap/lib/stdlib/ebin/calendar.beam
  139. BIN  bootstrap/lib/stdlib/ebin/dets.beam
  140. BIN  bootstrap/lib/stdlib/ebin/dets_server.beam
  141. BIN  bootstrap/lib/stdlib/ebin/dets_sup.beam
  142. BIN  bootstrap/lib/stdlib/ebin/dets_utils.beam
  143. BIN  bootstrap/lib/stdlib/ebin/dets_v8.beam
  144. BIN  bootstrap/lib/stdlib/ebin/dets_v9.beam
  145. BIN  bootstrap/lib/stdlib/ebin/dict.beam
  146. BIN  bootstrap/lib/stdlib/ebin/digraph.beam
  147. BIN  bootstrap/lib/stdlib/ebin/digraph_utils.beam
  148. BIN  bootstrap/lib/stdlib/ebin/edlin.beam
  149. BIN  bootstrap/lib/stdlib/ebin/edlin_expand.beam
  150. BIN  bootstrap/lib/stdlib/ebin/epp.beam
  151. BIN  bootstrap/lib/stdlib/ebin/erl_bits.beam
  152. BIN  bootstrap/lib/stdlib/ebin/erl_compile.beam
  153. BIN  bootstrap/lib/stdlib/ebin/erl_eval.beam
  154. BIN  bootstrap/lib/stdlib/ebin/erl_expand_records.beam
  155. BIN  bootstrap/lib/stdlib/ebin/erl_internal.beam
  156. BIN  bootstrap/lib/stdlib/ebin/erl_lint.beam
  157. BIN  bootstrap/lib/stdlib/ebin/erl_parse.beam
  158. BIN  bootstrap/lib/stdlib/ebin/erl_posix_msg.beam
  159. BIN  bootstrap/lib/stdlib/ebin/erl_pp.beam
  160. BIN  bootstrap/lib/stdlib/ebin/erl_scan.beam
  161. BIN  bootstrap/lib/stdlib/ebin/erl_tar.beam
  162. BIN  bootstrap/lib/stdlib/ebin/error_logger_file_h.beam
  163. BIN  bootstrap/lib/stdlib/ebin/error_logger_tty_h.beam
  164. BIN  bootstrap/lib/stdlib/ebin/escript.beam
  165. BIN  bootstrap/lib/stdlib/ebin/ets.beam
  166. BIN  bootstrap/lib/stdlib/ebin/eval_bits.beam
  167. BIN  bootstrap/lib/stdlib/ebin/file_sorter.beam
  168. BIN  bootstrap/lib/stdlib/ebin/filelib.beam
  169. BIN  bootstrap/lib/stdlib/ebin/filename.beam
  170. BIN  bootstrap/lib/stdlib/ebin/gb_sets.beam
  171. BIN  bootstrap/lib/stdlib/ebin/gb_trees.beam
  172. BIN  bootstrap/lib/stdlib/ebin/gen.beam
  173. BIN  bootstrap/lib/stdlib/ebin/gen_event.beam
  174. BIN  bootstrap/lib/stdlib/ebin/gen_fsm.beam
  175. BIN  bootstrap/lib/stdlib/ebin/gen_server.beam
  176. BIN  bootstrap/lib/stdlib/ebin/io.beam
  177. BIN  bootstrap/lib/stdlib/ebin/io_lib.beam
  178. BIN  bootstrap/lib/stdlib/ebin/io_lib_format.beam
  179. BIN  bootstrap/lib/stdlib/ebin/io_lib_fread.beam
  180. BIN  bootstrap/lib/stdlib/ebin/io_lib_pretty.beam
  181. BIN  bootstrap/lib/stdlib/ebin/lib.beam
  182. BIN  bootstrap/lib/stdlib/ebin/lists.beam
  183. BIN  bootstrap/lib/stdlib/ebin/log_mf_h.beam
  184. BIN  bootstrap/lib/stdlib/ebin/math.beam
  185. BIN  bootstrap/lib/stdlib/ebin/ms_transform.beam
  186. BIN  bootstrap/lib/stdlib/ebin/orddict.beam
  187. BIN  bootstrap/lib/stdlib/ebin/ordsets.beam
  188. BIN  bootstrap/lib/stdlib/ebin/otp_internal.beam
  189. BIN  bootstrap/lib/stdlib/ebin/pg.beam
  190. BIN  bootstrap/lib/stdlib/ebin/pool.beam
  191. BIN  bootstrap/lib/stdlib/ebin/proc_lib.beam
  192. BIN  bootstrap/lib/stdlib/ebin/proplists.beam
  193. BIN  bootstrap/lib/stdlib/ebin/qlc.beam
  194. BIN  bootstrap/lib/stdlib/ebin/qlc_pt.beam
  195. BIN  bootstrap/lib/stdlib/ebin/queue.beam
  196. BIN  bootstrap/lib/stdlib/ebin/random.beam
  197. BIN  bootstrap/lib/stdlib/ebin/re.beam
  198. BIN  bootstrap/lib/stdlib/ebin/regexp.beam
  199. BIN  bootstrap/lib/stdlib/ebin/sets.beam
  200. BIN  bootstrap/lib/stdlib/ebin/shell.beam
  201. BIN  bootstrap/lib/stdlib/ebin/shell_default.beam
  202. BIN  bootstrap/lib/stdlib/ebin/slave.beam
  203. BIN  bootstrap/lib/stdlib/ebin/sofs.beam
  204. +105 −0 bootstrap/lib/stdlib/ebin/
  205. +1 −0  bootstrap/lib/stdlib/ebin/stdlib.appup
  206. BIN  bootstrap/lib/stdlib/ebin/string.beam
  207. BIN  bootstrap/lib/stdlib/ebin/supervisor.beam
  208. BIN  bootstrap/lib/stdlib/ebin/supervisor_bridge.beam
  209. BIN  bootstrap/lib/stdlib/ebin/sys.beam
  210. BIN  bootstrap/lib/stdlib/ebin/timer.beam
  211. BIN  bootstrap/lib/stdlib/ebin/unicode.beam
  212. BIN  bootstrap/lib/stdlib/ebin/win32reg.beam
  213. BIN  bootstrap/lib/stdlib/ebin/zip.beam
  214. +9,250 −0 bootstrap/lib/stdlib/egen/erl_parse.erl
  215. +48 −0 bootstrap/lib/stdlib/include/erl_bits.hrl
  216. +43 −0 bootstrap/lib/stdlib/include/erl_compile.hrl
  217. +19 −0 bootstrap/lib/stdlib/include/ms_transform.hrl
  218. +19 −0 bootstrap/lib/stdlib/include/qlc.hrl
  219. +31 −0 bootstrap/lib/stdlib/include/zip.hrl
  220. +297 −0
  221. +138 −0 erts/AUTHORS
  222. +157 −0 erts/
  223. +938 −0 erts/aclocal.m4
  224. +1,519 −0 erts/autoconf/config.guess
  225. +1,630 −0 erts/autoconf/config.sub
  226. +147 −0 erts/autoconf/configure.vxworks
  227. +519 −0 erts/autoconf/install-sh
  228. +125 −0 erts/autoconf/vxworks/sed.general
  229. +42 −0 erts/autoconf/vxworks/sed.vxworks_cpu32
  230. +48 −0 erts/autoconf/vxworks/sed.vxworks_ppc32
  231. +48 −0 erts/autoconf/vxworks/sed.vxworks_ppc603
  232. +48 −0 erts/autoconf/vxworks/sed.vxworks_ppc603_nolongcall
  233. +47 −0 erts/autoconf/vxworks/sed.vxworks_ppc860
  234. +57 −0 erts/autoconf/vxworks/sed.vxworks_simlinux
  235. +62 −0 erts/autoconf/vxworks/sed.vxworks_simso
  236. +38 −0 erts/autoconf/vxworks/sed.vxworks_sparc
  237. +233 −0 erts/autoconf/win32.config.cache
  238. +3,772 −0 erts/
  239. +36 −0 erts/doc/Makefile
  240. 0  erts/doc/html/.gitignore
  241. 0  erts/doc/man1/.gitignore
  242. 0  erts/doc/man3/.gitignore
  243. 0  erts/doc/pdf/.gitignore
  244. +153 −0 erts/doc/src/Makefile
  245. +444 −0 erts/doc/src/absform.xml
  246. +1,099 −0 erts/doc/src/alt_dist.xml
  247. +49 −0 erts/doc/src/book.xml
  248. +518 −0 erts/doc/src/crash_dump.xml
  249. 0  erts/doc/src/driver.xml
  250. 0  erts/doc/src/driver_entry.xml
  251. 0  erts/doc/src/epmd.xml
  252. 0  erts/doc/src/erl.xml
  253. 0  erts/doc/src/erl_dist_protocol.xml
  254. 0  erts/doc/src/erl_driver.xml
  255. 0  erts/doc/src/erl_ext_dist.xml
  256. 0  erts/doc/src/erl_ext_fig.gif
  257. 0  erts/doc/src/
  258. 0  erts/doc/src/erl_fix_alloc.fig
  259. 0  erts/doc/src/erl_fix_alloc.gif
  260. 0  erts/doc/src/
  261. 0  erts/doc/src/erl_nif.xml
  262. 0  erts/doc/src/erl_prim_loader.xml
  263. 0  erts/doc/src/erl_set_memory_block.xml
  264. 0  erts/doc/src/erlang.xml
  265. 0  erts/doc/src/erlc.xml
  266. 0  erts/doc/src/erlsrv.xml
  267. 0  erts/doc/src/erts_alloc.xml
  268. 0  erts/doc/src/escript.xml
  269. 0  erts/doc/src/fascicules.xml
  270. 0  erts/doc/src/inet_cfg.xml
  271. 0  erts/doc/src/init.xml
  272. 0  erts/doc/src/make.dep
  273. 0  erts/doc/src/match_spec.xml
  274. 0  erts/doc/src/notes.xml
  275. 0  erts/doc/src/notes_history.xml
  276. 0  erts/doc/src/part.xml
  277. 0  erts/doc/src/part_notes.xml
  278. 0  erts/doc/src/part_notes_history.xml
  279. 0  erts/doc/src/ref_man.xml
  280. 0  erts/doc/src/run_erl.xml
  281. 0  erts/doc/src/start.xml
  282. 0  erts/doc/src/start_erl.xml
  283. 0  erts/doc/src/tty.xml
  284. 0  erts/doc/src/werl.xml
  285. 0  erts/doc/src/zlib.xml
  286. 0  erts/emulator/Makefile
  287. 0  erts/emulator/
  288. 0  erts/emulator/beam/atom.c
  289. 0  erts/emulator/beam/atom.h
  290. 0  erts/emulator/beam/atom.names
  291. 0  erts/emulator/beam/beam_bif_load.c
  292. 0  erts/emulator/beam/beam_bp.c
  293. 0  erts/emulator/beam/beam_bp.h
  294. 0  erts/emulator/beam/beam_catches.c
  295. 0  erts/emulator/beam/beam_catches.h
  296. 0  erts/emulator/beam/beam_debug.c
  297. 0  erts/emulator/beam/beam_emu.c
  298. 0  erts/emulator/beam/beam_load.c
  299. 0  erts/emulator/beam/beam_load.h
  300. 0  erts/emulator/beam/benchmark.c
Sorry, we could not display the entire diff because too many files (7,642) changed.
23 .gitignore
@@ -0,0 +1,23 @@
+# Match at any level.
+# Anchored from $ERL_TOP
@@ -0,0 +1,13 @@
+ Contributions - improvements, fixes, new features - from developers
+ make the Erlang 'Open Source' project a success. To give credit
+ where it's due, we've added a file called AUTHORS to each
+ application sub-directory with a list of everyone who has contributed
+ It might also contain the names of the original authors at Ericsson.
+ Speaking of original authors, we don't want to forget all the people
+ working full time with Erlang and OTP. So, thanks to everyone
+ working with Erlang at the OTP group, the Computer Science
+ Laboratory and the Software Architecture Laboratory.
@@ -0,0 +1,286 @@
+Version 1.1
+1. Definitions.
+1.1. ``Contributor'' means each entity that creates or contributes to
+the creation of Modifications.
+1.2. ``Contributor Version'' means the combination of the Original
+Code, prior Modifications used by a Contributor, and the Modifications
+made by that particular Contributor.
+1.3. ``Covered Code'' means the Original Code or Modifications or the
+combination of the Original Code and Modifications, in each case
+including portions thereof.
+1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
+accepted in the software development community for the electronic
+transfer of data.
+1.5. ``Executable'' means Covered Code in any form other than Source
+1.6. ``Initial Developer'' means the individual or entity identified
+as the Initial Developer in the Source Code notice required by Exhibit
+1.7. ``Larger Work'' means a work which combines Covered Code or
+portions thereof with code not governed by the terms of this License.
+1.8. ``License'' means this document.
+1.9. ``Modifications'' means any addition to or deletion from the
+substance or structure of either the Original Code or any previous
+Modifications. When Covered Code is released as a series of files, a
+Modification is:
+A. Any addition to or deletion from the contents of a file containing
+ Original Code or previous Modifications.
+B. Any new file that contains any part of the Original Code or
+ previous Modifications.
+1.10. ``Original Code'' means Source Code of computer software code
+which is described in the Source Code notice required by Exhibit A as
+Original Code, and which, at the time of its release under this
+License is not already Covered Code governed by this License.
+1.11. ``Source Code'' means the preferred form of the Covered Code for
+making modifications to it, including all modules it contains, plus
+any associated interface definition files, scripts used to control
+compilation and installation of an Executable, or a list of source
+code differential comparisons against either the Original Code or
+another well known, available Covered Code of the Contributor's
+choice. The Source Code can be in a compressed or archival form,
+provided the appropriate decompression or de-archiving software is
+widely available for no charge.
+1.12. ``You'' means an individual or a legal entity exercising rights
+under, and complying with all of the terms of, this License. For legal
+entities,``You'' includes any entity which controls, is controlled by,
+or is under common control with You. For purposes of this definition,
+``control'' means (a) the power, direct or indirect, to cause the
+direction or management of such entity, whether by contract or
+otherwise, or (b) ownership of fifty percent (50%) or more of the
+outstanding shares or beneficial ownership of such entity.
+2. Source Code License.
+2.1. The Initial Developer Grant.
+The Initial Developer hereby grants You a world-wide, royalty-free,
+non-exclusive license, subject to third party intellectual property
+(a) to use, reproduce, modify, display, perform, sublicense and
+ distribute the Original Code (or portions thereof) with or without
+ Modifications, or as part of a Larger Work; and
+(b) under patents now or hereafter owned or controlled by Initial
+ Developer, to make, have made, use and sell (``Utilize'') the
+ Original Code (or portions thereof), but solely to the extent that
+ any such patent is reasonably necessary to enable You to Utilize
+ the Original Code (or portions thereof) and not to any greater
+ extent that may be necessary to Utilize further Modifications or
+ combinations.
+2.2. Contributor Grant.
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license, subject to third party intellectual property
+(a) to use, reproduce, modify, display, perform, sublicense and
+ distribute the Modifications created by such Contributor (or
+ portions thereof) either on an unmodified basis, with other
+ Modifications, as Covered Code or as part of a Larger Work; and
+(b) under patents now or hereafter owned or controlled by Contributor,
+ to Utilize the Contributor Version (or portions thereof), but
+ solely to the extent that any such patent is reasonably necessary
+ to enable You to Utilize the Contributor Version (or portions
+ thereof), and not to any greater extent that may be necessary to
+ Utilize further Modifications or combinations.
+3. Distribution Obligations.
+3.1. Application of License.
+The Modifications which You contribute are governed by the terms of
+this License, including without limitation Section 2.2. The Source
+Code version of Covered Code may be distributed only under the terms
+of this License, and You must include a copy of this License with
+every copy of the Source Code You distribute. You may not offer or
+impose any terms on any Source Code version that alters or restricts
+the applicable version of this License or the recipients' rights
+hereunder. However, You may include an additional document offering
+the additional rights described in Section 3.5.
+3.2. Availability of Source Code.
+Any Modification which You contribute must be made available in Source
+Code form under the terms of this License either on the same media as
+an Executable version or via an accepted Electronic Distribution
+Mechanism to anyone to whom you made an Executable version available;
+and if made available via Electronic Distribution Mechanism, must
+remain available for at least twelve (12) months after the date it
+initially became available, or at least six (6) months after a
+subsequent version of that particular Modification has been made
+available to such recipients. You are responsible for ensuring that
+the Source Code version remains available even if the Electronic
+Distribution Mechanism is maintained by a third party.
+3.3. Description of Modifications.
+You must cause all Covered Code to which you contribute to contain a
+file documenting the changes You made to create that Covered Code and
+the date of any change. You must include a prominent statement that
+the Modification is derived, directly or indirectly, from Original
+Code provided by the Initial Developer and including the name of the
+Initial Developer in (a) the Source Code, and (b) in any notice in an
+Executable version or related documentation in which You describe the
+origin or ownership of the Covered Code.
+3.4. Intellectual Property Matters
+(a) Third Party Claims.
+ If You have knowledge that a party claims an intellectual property
+ right in particular functionality or code (or its utilization
+ under this License), you must include a text file with the source
+ code distribution titled ``LEGAL'' which describes the claim and
+ the party making the claim in sufficient detail that a recipient
+ will know whom to contact. If you obtain such knowledge after You
+ make Your Modification available as described in Section 3.2, You
+ shall promptly modify the LEGAL file in all copies You make
+ available thereafter and shall take other steps (such as notifying
+ appropriate mailing lists or newsgroups) reasonably calculated to
+ inform those who received the Covered Code that new knowledge has
+ been obtained.
+(b) Contributor APIs.
+ If Your Modification is an application programming interface and
+ You own or control patents which are reasonably necessary to
+ implement that API, you must also include this information in the
+ LEGAL file.
+3.5. Required Notices.
+You must duplicate the notice in Exhibit A in each file of the Source
+Code, and this License in any documentation for the Source Code, where
+You describe recipients' rights relating to Covered Code. If You
+created one or more Modification(s), You may add your name as a
+Contributor to the notice described in Exhibit A. If it is not
+possible to put such notice in a particular Source Code file due to
+its structure, then you must include such notice in a location (such
+as a relevant directory file) where a user would be likely to look for
+such a notice. You may choose to offer, and to charge a fee for,
+warranty, support, indemnity or liability obligations to one or more
+recipients of Covered Code. However, You may do so only on Your own
+behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear than any such warranty,
+support, indemnity or liability obligation is offered by You alone,
+and You hereby agree to indemnify the Initial Developer and every
+Contributor for any liability incurred by the Initial Developer or
+such Contributor as a result of warranty, support, indemnity or
+liability terms You offer.
+3.6. Distribution of Executable Versions.
+You may distribute Covered Code in Executable form only if the
+requirements of Section 3.1-3.5 have been met for that Covered Code,
+and if You include a notice stating that the Source Code version of
+the Covered Code is available under the terms of this License,
+including a description of how and where You have fulfilled the
+obligations of Section 3.2. The notice must be conspicuously included
+in any notice in an Executable version, related documentation or
+collateral in which You describe recipients' rights relating to the
+Covered Code. You may distribute the Executable version of Covered
+Code under a license of Your choice, which may contain terms different
+from this License, provided that You are in compliance with the terms
+of this License and that the license for the Executable version does
+not attempt to limit or alter the recipient's rights in the Source
+Code version from the rights set forth in this License. If You
+distribute the Executable version under a different license You must
+make it absolutely clear that any terms which differ from this License
+are offered by You alone, not by the Initial Developer or any
+Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+3.7. Larger Works.
+You may create a Larger Work by combining Covered Code with other code
+not governed by the terms of this License and distribute the Larger
+Work as a single product. In such a case, You must make sure the
+requirements of this License are fulfilled for the Covered Code.
+4. Inability to Comply Due to Statute or Regulation.
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Code due to statute
+or regulation then You must: (a) comply with the terms of this License
+to the maximum extent possible; and (b) describe the limitations and
+the code they affect. Such description must be included in the LEGAL
+file described in Section 3.4 and must be included with all
+distributions of the Source Code. Except to the extent prohibited by
+statute or regulation, such description must be sufficiently detailed
+for a recipient of ordinary skill to be able to understand it.
+5. Application of this License.
+This License applies to code to which the Initial Developer has
+attached the notice in Exhibit A, and to related Covered Code.
+This Erlang License is a derivative work of the Mozilla Public
+License, Version 1.0. It contains terms which differ from the Mozilla
+Public License, Version 1.0.
+This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. All
+sublicenses to the Covered Code which are properly granted shall
+survive any termination of this License. Provisions which, by their
+nature, must remain in effect beyond the termination of this License
+shall survive.
+Any utilization of Covered Code shall not cause the Initial Developer
+or any Contributor to be liable for any damages (neither direct nor
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision is held to be unenforceable, such
+provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be construed by and in accordance with
+the substantive laws of Sweden. Any dispute, controversy or claim
+arising out of or relating to this License, or the breach, termination
+or invalidity thereof, shall be subject to the exclusive jurisdiction
+of Swedish courts, with the Stockholm City Court as the first
+``The contents of this file are subject to the Erlang Public License,
+Version 1.1, (the "License"); you may not use this file except in
+compliance with the License. You should have received a copy of the
+Erlang Public License along with this software. If not, it can be
+retrieved via the world wide web at
+Software distributed under the License is distributed on an "AS IS"
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+the License for the specific language governing rights and limitations
+under the License.
+The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+AB. All Rights Reserved.''
@@ -0,0 +1,813 @@
+# %CopyrightBegin%
+# Copyright Ericsson AB 1998-2009. All Rights Reserved.
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+# %CopyrightEnd%
+# Toplevel makefile for building the Erlang system
+# ----------------------------------------------------------------------
+# And you'd think that this would be obvious... :-)
+SHELL = /bin/sh
+# The top directory in which Erlang is unpacked
+# erts (Erlang RunTime System) version
+# ----------------------------------------------------------------------
+# The variables below control where Erlang is installed. They are
+# configurable (unless otherwise stated). Some of them are best
+# changed by giving special arguments to configure instead of changing
+# them in this file. Note: If you change them in Makefile, instead of
+# your changes will be lost the next time you run
+# configure.
+# prefix from autoconf, default is /usr/local (must be an absolute path)
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+# The following can be set in case you install Erlang in a different
+# location from where you have configured it to run. This can be
+# useful e.g. when installing on a server that stores the files with a
+# different path from where the clients access them. Or when building
+# rpms.
+# Naah...override `prefix' instead.
+# The directory in which user executables (ERL_BASE_PUB_FILES) are put
+# Erlang base public files
+ERL_BASE_PUB_FILES=erl erlc epmd run_erl to_erl dialyzer typer escript
+# The directory which will contain installed Erlang version.
+# (ILIBDIR is supposed to be LIBDIR *without* the install prefix)
+ERLANG_ILIBDIR = @libdir@/erlang
+# You can *not* change these two, they have to stay this way for now.
+# The directory in which man pages for above executables are put
+ERL_MAN1DIR = $(INSTALL_PREFIX)@mandir@/man1
+# The directory in which Erlang private man pages are put. In order
+# not to clutter up the man namespace these are by default put in the
+# Erlang private directory $(ERLANG_ILIBDIR)/man. If you want to
+# install the man pages together with the rest give the argument
+# "--disable-erlang-mandir" when you run configure, which will set
+# MAN_DIR to @mandir@.
+# If you want a special suffix on the manpages set ERL_MANEXT to
+# this suffix, e.g. "erl"
+# ----------------------------------------------------------------------
+# Must be GNU make!
+# This should be set to the target "arch-vendor-os"
+export TARGET = @TARGET@
+# A BSD compatible install program
+# Program to create symbolic links
+LN_S = @LN_S@
+# Ranlib program, if not needed set to e.g. ":"
+# ----------------------------------------------------------------------
+# The directory where at least the primary bootstrap is placed under.
+# We need to build to view private files in case we are in clearcase;
+# therefore, we don't want BOOTSTRAP_TOP changed.
+# PRIMARY_BOOTSTRAP_TOP would perhaps have been a better name...
+override BOOTSTRAP_TOP = $(ERL_TOP)/bootstrap
+# BOOTSTRAP_SRC_TOP is normally the same as BOOTSTRAP_TOP but
+# it is allowed to be changed
+# Where to install the bootstrap directory.
+# Typically one might want to set this to a fast local filesystem, or,
+# the default, as ERL_TOP
+# Directories which you need in the path if you wish to run the
+# locally built system. (This can be put in front or back of the path
+# depending on which system is preferred.)
+LOCAL_PATH = $(ERL_TOP)/erts/bin/$(TARGET):$(ERL_TOP)/erts/bin
+ifeq ($(TARGET),win32)
+# ----------------------------------------------------------------------
+ifeq ($(RELEASE_ROOT),)
+ifneq ($(TESTROOT),)
+# ----------------------------------------------------------------------
+# A default for the release_tests, not same target dir as release.
+# More TESTROOT havoc...
+ifeq ($(TESTSUITE_ROOT),)
+ifneq ($(TESTROOT),)
+TESTSUITE_ROOT = $(ERL_TOP)/release/tests
+# The steps to build a working system are:
+# * build an emulator
+# * setup the erl and erlc program in bootstrap/bin
+# * build additional compilers and copy them into bootstrap/lib
+# * use the bootstrap erl and erlc to build all the libs
+all: all_bootstraps \
+ libs local_setup dialyzer
+# With all bootstraps we mean all bootstrapping that is done when
+# the system is delivered in open source, the primary
+# bootstrap is not included, it requires a pre built emulator...
+all_bootstraps: depend emulator \
+ bootstrap_setup \
+ secondary_bootstrap_build secondary_bootstrap_copy \
+ tertiary_bootstrap_build tertiary_bootstrap_copy \
+ fourth_bootstrap_build fourth_bootstrap_copy
+# Use these targets when you want to use the erl and erlc
+# binaries in your PATH instead of those created from the
+# pre-compiled Erlang modules under bootstrap/.
+ifeq ($(findstring ose,$(TARGET)),ose)
+ $(MAKE) BOOT_PREFIX= emulator libs
+ $(MAKE) BOOT_PREFIX= emulator libs local_setup
+ $(MAKE) BOOT_PREFIX= install
+.PHONY: release release_docs
+ifeq ($(OTP_SMALL_BUILD),true)
+ cd $(ERL_TOP)/lib && $(MAKE) TESTROOT=$(RELEASE_ROOT) release
+ cd $(ERL_TOP)/lib && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release
+ifneq ($(findstring vxworks,$(TARGET)),vxworks)
+ @if test -f lib/dialyzer/SKIP ; then \
+ echo "=== Skipping dialyzer, reason:" ; \
+ cat lib/dialyzer/SKIP ; \
+ echo "===" ; \
+ else \
+ cd $(ERL_TOP)/lib/dialyzer && \
+ fi
+ cd $(ERL_TOP)/erts && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release
+# ---------------------------------------------------------------
+# Target only used when building commercial ERTS patches
+# ---------------------------------------------------------------
+ifeq ($(OTP_SMALL_BUILD),true)
+ cd $(ERL_TOP)/lib && $(MAKE) TESTROOT=$(RELEASE_ROOT) release_docs
+ cd $(ERL_TOP)/lib && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release_docs
+ cd $(ERL_TOP)/lib/dialyzer && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release_docs
+ cd $(ERL_TOP)/erts && $(MAKE) BUILD_ALL=1 TESTROOT=$(RELEASE_ROOT) release_docs
+# ----------------------------------------------------------------------
+.PHONY: emulator libs kernel stdlib compiler hipe dialyzer typer syntax_tools preloaded
+ifeq ($(OTP_SMALL_BUILD),true)
+ cd lib && \
+ $(MAKE) opt
+ cd lib && \
+ $(MAKE) opt BUILD_ALL=true
+ cd lib/kernel && \
+ $(MAKE) opt BUILD_ALL=true
+ cd lib/stdlib && \
+ $(MAKE) opt BUILD_ALL=true
+ cd lib/compiler && \
+ $(MAKE) opt BUILD_ALL=true
+ cd lib/hipe && \
+ $(MAKE) opt BUILD_ALL=true
+ifneq ($(OTP_SMALL_BUILD),true)
+ @if test -f lib/dialyzer/SKIP ; then \
+ echo "=== Skipping dialyzer, reason:" ; \
+ cat lib/dialyzer/SKIP ; \
+ echo "===" ; \
+ else \
+ cd lib/dialyzer && \
+ $(MAKE) opt BUILD_ALL=true ; \
+ fi
+ cd lib/typer && \
+ $(MAKE) opt BUILD_ALL=true
+ cd lib/syntax_tools && \
+ $(MAKE) opt BUILD_ALL=true
+ cd erts/preloaded/src && \
+ $(MAKE) opt BUILD_ALL=true
+dep depend:
+ test X"$$ERTS_SKIP_DEPEND" = X"true" || (cd erts/emulator && ERL_TOP=$(ERL_TOP) $(MAKE) generate depend)
+ test X"$$ERTS_SKIP_DEPEND" = X"true" || (cd erts/lib_src && ERL_TOP=$(ERL_TOP) $(MAKE) depend)
+# Creates "erl" and "erlc" in bootstrap/bin which uses the precompiled
+# libraries in the bootstrap directory
+# ----------------------------------------------------------------------
+# Bootstraps...
+# ----------------------------------------------------------------------
+ifeq ($(TARGET),win32)
+bootstrap_setup: check_recreate_primary_bootstrap
+ @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.exe \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc.exe \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.ini \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/beam.dll
+ $(BOOTSTRAP_ROOT)/bootstrap \
+ $(ERL_TOP)/bin/$(TARGET)
+ @cp $(ERL_TOP)/bin/$(TARGET)/erlc.exe \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc.exe
+ @cp $(ERL_TOP)/bin/$(TARGET)/erl.exe \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl.exe
+bootstrap_setup: check_recreate_primary_bootstrap $(BOOTSTRAP_ROOT)/bootstrap/bin/erl $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
+$(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/etc/unix/erl.src.src
+ @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erl
+ @sed -e "s;%FINAL_ROOTDIR%;$(BOOTSTRAP_ROOT)/bootstrap;" \
+ -e "s;\$$ROOTDIR/erts-.*/bin;$(ERL_TOP)/bin/$(TARGET);" \
+ -e "s;EMU=.*;EMU=beam$(TYPEMARKER);" \
+ $(ERL_TOP)/erts/etc/unix/erl.src.src > \
+ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl
+ @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erl
+$(BOOTSTRAP_ROOT)/bootstrap/bin/erlc: $(ERL_TOP)/bin/$(TARGET)/erlc
+ @rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
+ @cp $(ERL_TOP)/bin/$(TARGET)/erlc $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
+ @chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erlc
+ cd lib && \
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin ; fi
+ for x in lib/hipe/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+ rm -f lib/hipe/ebin/*.beam
+# if test -f lib/hipe/ebin/hipe.beam ; then cp lib/hipe/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/hipe/ebin; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include ; fi
+ for x in lib/parsetools/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp lib/parsetools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/ebin
+ for x in lib/parsetools/include/*.hrl; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp -f lib/parsetools/include/*.hrl $(BOOTSTRAP_ROOT)/bootstrap/lib/parsetools/include
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1 ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1 ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src ; fi
+ for x in lib/asn1/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp lib/asn1/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/ebin
+ for x in lib/asn1/src/*.[eh]rl; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp -f lib/asn1/src/*.erl lib/asn1/src/*.hrl $(BOOTSTRAP_ROOT)/bootstrap/lib/asn1/src
+ cd lib && \
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/include ; fi
+ for x in lib/snmp/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp lib/snmp/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/snmp/ebin
+ cd lib && \
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/include ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/ic ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/ic ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; fi
+ for x in lib/ic/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp lib/ic/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin
+ for x in lib/ic/include/*.idl; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+ for x in lib/ic/include/*.h; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp -f lib/ic/include/*.idl lib/ic/include/*.h $(BOOTSTRAP_ROOT)/bootstrap/lib/ic/include
+ for x in lib/sasl/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp lib/sasl/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/sasl/ebin
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools ; fi
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin ; fi
+ for x in lib/syntax_tools/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+ for x in lib/wx/include/*.hrl; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# cp lib/syntax_tools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin
+.PHONY: check_recreate_primary_bootstrap recreate_primary_bootstrap
+# If the source is a prebuilt delivery, no $(ERL_TOP)/bootstrap/lib
+# directory will exist. All applications part of the primary bootstrap
+# are delivered prebuilt though. If it is a prebuilt delivery we need
+# to recreate the primary bootstrap, from the prebuilt result.
+# A prebuild delivery always contain a $(ERL_TOP)/prebuilt.files file.
+# If no such file exists, we wont try to recreate the primary bootstrap,
+# since it will just fail producing anything useful.
+ @if test -f $(ERL_TOP)/prebuilt.files ; then \
+ if test ! -d $(ERL_TOP)/bootstrap/lib ; then \
+ $(ERL_TOP)/otp_build save_bootstrap ; \
+ fi ; \
+ fi
+# recreate_primary_bootstrap assumes that if $(ERL_TOP)/prebuilt.files
+# exist, all build results needed already exist in the application specific
+# directories of all applications part of the primary bootstrap.
+ $(ERL_TOP)/otp_build save_bootstrap
+# The first bootstrap build is rarely (never) used in open source, it's
+# used to build the shipped bootstrap directory. The Open source bootstrap
+# stages start with secondary bootstrap.
+# These are the ones used, the other ones (prefixed with old_) are for BC.
+# These modules should stay in the kernel directory to make building
+# of the emulator possible
+.PHONY: primary_bootstrap \
+ primary_bootstrap_check_make \
+ primary_bootstrap_build \
+ primary_bootstrap_compiler \
+ primary_bootstrap_mkdirs \
+ primary_bootstrap_copy
+primary_bootstrap: primary_bootstrap_check_make
+ @echo "=== Building a bootstrap compiler in $(BOOTSTRAP_ROOT)/bootstrap"
+ cd $(ERL_TOP) && \
+ primary_bootstrap_build
+ cd $(ERL_TOP) && \
+ primary_bootstrap_copy
+ cd $(ERL_TOP)/erts/start_scripts && \
+ BOOTSTRAP_TOP=$(BOOTSTRAP_TOP) bootstrap_scripts
+ test $(BOOTSTRAP_ROOT) = $(ERL_TOP) \
+ || $(ERL_TOP)/otp_build \
+ copy_primary_bootstrap \
+# Dependencies are not complete in all makefiles; therefore, remove bootstrap
+# build result and build from scratch if we are not using clearmake (which
+# tracks dependencies itself).
+ @ case "$(MAKE)" in \
+ *clearmake*) \
+ ;; \
+ *) \
+ bootstrap_clean \
+ ;; \
+ esac
+primary_bootstrap_build: primary_bootstrap_mkdirs primary_bootstrap_compiler \
+ primary_bootstrap_stdlib
+ cd lib && $(MAKE) ERLC_FLAGS='-pa $(BOOTSTRAP_COMPILER)/ebin' \
+ cd lib/compiler && $(MAKE) \
+ opt
+ cd lib/stdlib/src && $(MAKE) \
+ primary_bootstrap_compiler
+ test -d $(BOOTSTRAP_COMPILER)/egen \
+ || mkdir -p $(BOOTSTRAP_COMPILER)/egen
+ test -d $(BOOTSTRAP_COMPILER)/ebin \
+ || mkdir -p $(BOOTSTRAP_COMPILER)/ebin
+ test -d $(BOOTSTRAP_TOP)/lib/kernel/egen \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/kernel/egen
+ test -d $(BOOTSTRAP_TOP)/lib/kernel/ebin \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/kernel/ebin
+ test -d $(BOOTSTRAP_TOP)/lib/kernel/include \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/kernel/include
+ test -d $(BOOTSTRAP_TOP)/lib/stdlib/egen \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/stdlib/egen
+ test -d $(BOOTSTRAP_TOP)/lib/stdlib/ebin \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/stdlib/ebin
+ test -d $(BOOTSTRAP_TOP)/lib/stdlib/include \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/stdlib/include
+ test -d $(BOOTSTRAP_TOP)/lib/compiler/egen \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/compiler/egen
+ test -d $(BOOTSTRAP_TOP)/lib/compiler/ebin \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/compiler/ebin
+ test -d $(BOOTSTRAP_TOP)/lib/orber/include \
+ || mkdir -p $(BOOTSTRAP_TOP)/lib/orber/include
+ cp -f lib/kernel/include/*.hrl $(BOOTSTRAP_TOP)/lib/kernel/include
+ cp -f lib/stdlib/include/*.hrl $(BOOTSTRAP_TOP)/lib/stdlib/include
+ cp -f lib/orber/include/* $(BOOTSTRAP_TOP)/lib/orber/include
+# To remove modules left by the bootstrap building, but leave (restore)
+# the modules in kernel which are needed for an emulator build
+KERNEL_PRELOAD = otp_ring0 init erl_prim_loader prim_inet prim_file zlib prim_zip erlang
+# Creates "erl" and "erlc" scripts in bin/erl which uses the libraries in lib
+ @rm -f erts/bin/erl erts/bin/erlc erts/bin/cerl
+ @cd erts && \
+ $(MAKE) local_setup
+# ----------------------------------------------------------------------
+# Build tests
+# ---------------------------------------------------------------------
+ lib/test_server \
+ $(wildcard lib/*/test) \
+ erts/test \
+ erts/epmd/test \
+ erts/emulator/test
+.PHONY: tests release_tests $(TEST_DIRS)
+tests release_tests: $(TEST_DIRS)
+ if test -f $@/Makefile; then \
+ (cd $@; $(MAKE) TESTROOT=$(TESTSUITE_ROOT) release_tests) || exit $$?; \
+ fi
+# ----------------------------------------------------------------------
+# Obsolete type of bootstrap where all stages where built with installed sytem
+# shuld no longer be used and is soon to be removed.
+# Abbreviations: OC = Old Compiler, NC = New Compiler,
+# OE = Old Emulator, NE = New Emulator
+old_com_bootstrap: old_bootstrap_nc_for_ne_all_stages old_bootstrap_ne old_bootstrap_scripts
+# Builds the New Compiler for the New Emulator (using existing erlc
+# and possibly new compiler) then copy everything to the release area.
+# Use to create the commerciall bootstrap version, which should be obsolete.
+ test -d $(TESTROOT) || mkdir -p $(TESTROOT)
+ cd lib && $(MAKE) BOOTSTRAP=1 TYPE=release release
+ cd lib && $(MAKE) SECONDARY_BOOTSTRAP=1 TYPE=release release
+ cd lib && $(MAKE) TERTIARY_BOOTSTRAP=1 TYPE=release release
+ cd lib && $(MAKE) FOURTH_BOOTSTRAP=1 TYPE=release release
+ cd erts && $(MAKE) release
+ cd erts/start_scripts && $(MAKE) release
+# This is one strange name for a target, this actually builds and strips only
+# the primary bootstrap, a minimal set of beam files to be able to continue
+# bootstrap builds. It's used by other makefiles, so I refrain from
+# changing the name right now...
+ test -d $(TESTROOT) || mkdir -p $(TESTROOT)
+ cd lib && $(MAKE) ERLC_FLAGS='-pa $(BOOTSTRAP_COMPILER)/ebin' \
+ $(ERL_TOP)/erts/emulator/utils/beam_strip $(TESTROOT)/lib/*/ebin/*.beam
+# ----------------------------------------------------------------------
+# Install
+# Order is important here, don't change it!
+install: install.dirs install.emulator install.libs install.Install install.bin
+ cd erts && \
+ifeq ($(OTP_SMALL_BUILD),true)
+ cd lib && \
+ cd lib && \
+ @if test -f lib/dialyzer/SKIP ; then \
+ echo "=== Skipping dialyzer, reason:" ; \
+ cat lib/dialyzer/SKIP ; \
+ echo "===" ; \
+ else \
+ cd lib/dialyzer && \
+ fi
+ cd $(ERLANG_LIBDIR) && ./Install -minimal $(ERLANG_LIBDIR)
+# Install erlang base public files
+ for file in $(ERL_BASE_PUB_FILES); do \
+ rm -f $(BINDIR)/$$file; \
+ ${LN_S} $(ERLANG_BINDIR)/$$file $(BINDIR)/$$file; \
+ done
+# Directories needed before we can install
+ test -d $(BINDIR) || ${MKSUBDIRS} $(BINDIR)
+# ----------------------------------------------------------------------
+.PHONY: clean eclean bootstrap_root_clean bootstrap_clean
+# Clean targets
+clean: check_recreate_primary_bootstrap
+ rm -f *~ *.bak config.log config.status prebuilt.files
+ find . -type f -name SKIP -print | xargs $(RM)
+ cd erts && ERL_TOP=$(ERL_TOP) $(MAKE) clean
+ cd lib && ERL_TOP=$(ERL_TOP) $(MAKE) clean BUILD_ALL=true
+ cd lib/dialyzer && ERL_TOP=$(ERL_TOP) $(MAKE) clean
+# Just wipe out emulator, not libraries
+ cd erts && ERL_TOP=$(ERL_TOP) $(MAKE) clean
+# Clean up bootstrap
+ rm -f $(BOOTSTRAP_ROOT)/bootstrap/lib/*/ebin/*.beam
+ rm -f $(BOOTSTRAP_ROOT)/bootstrap/lib/*/include/*.hrl
+ rm -f $(BOOTSTRAP_ROOT)/bootstrap/bin/*.*
+# $(ERL_TOP)/bootstrap *should* equal $(BOOTSTRAP_TOP)
+# We use $(ERL_TOP)/bootstrap instead of $(BOOTSTRAP_TOP) here as an
+# extra safety precaution (we would really make a mess if
+# $(BOOTSTRAP_TOP) for some reason should be empty).
+ rm -f $(ERL_TOP)/bootstrap/lib/*/ebin/*.beam
+ rm -f $(ERL_TOP)/bootstrap/lib/*/egen/*
+ rm -f $(ERL_TOP)/bootstrap/lib/*/include/*.hrl
+ rm -f $(ERL_TOP)/bootstrap/primary_compiler/ebin/*
+ rm -f $(ERL_TOP)/bootstrap/primary_compiler/egen/*
+ rm -f $(ERL_TOP)/bootstrap/bin/*.*
+ rm -f $(KERNEL_PRELOAD:%=$(ERL_TOP)/lib/kernel/ebin/%.beam)
+ test $(BOOTSTRAP_ROOT) = $(ERL_TOP) \
+ || $(MAKE) BOOTSTRAP_ROOT=$(BOOTSTRAP_ROOT) bootstrap_root_clean
+# ----------------------------------------------------------------------
@@ -0,0 +1,472 @@
+ OpenSource Erlang/OTP
+Please read the whole file before attempting to build and install Erlang.
+You can find more information about OpenSource Erlang at
+The source code for Erlang/OTP can also be found in a Git
+repository at
+Copyright Ericsson AB 1998-2009. All Rights Reserved.
+The contents of this file are subject to the Erlang Public License,
+Version 1.1, (the "License"); you may not use this file except in
+compliance with the License. You should have received a copy of the
+Erlang Public License along with this software. If not, it can be
+retrieved online at
+Software distributed under the License is distributed on an "AS IS"
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+the License for the specific language governing rights and limitations
+under the License.
+Erlang/OTP should be possible to build from source on any Unix
+system, including Mac OS X.
+Instructions for building from source on Windows are in the file README.win32.
+Binary releases for Windows can be found at
+At Ericsson we have a "Daily Build and Test" that runs on:
+ Operating system Versions
+ -----------------------------------------------------------
+ Solaris/Sparc32 8, 9, 10
+ Solaris/Sparc64 10
+ Solaris/x86 10
+ Linux/Suse x86 9.4, 10.1
+ Linux/Suse x86_64 10.0, 10.1, 11.0
+ FreeBSD x86 7.1
+ Mac OS X/Intel 10.4.11 (Tiger), 10.5.8 (Leopard)
+ Windows XP SP3, 2003, Vista
+We have also done some testing on Mac OS 10.6.0 (Snow Leopard).
+Versions known *not* to work
+Suse linux 9.1 is shipped with a patched GCC version 3.3.3, having the
+rpm named gcc-3.3.3-41. That version has a serious optimization bug
+that makes it unusable for building the Erlang emulator. Please
+upgrade GCC to a newer version before building on Suse 9.1. Suse Linux
+EnterpriSe edition 9 (SLES9) has gcc-3.3.3-43 and is not affected.
+gcc-4.3.0 has a serious optimizer bug. It produces an Erlang emulator
+that will crash immediately. The bug is supposed to be fixed in gcc-4.3.1.
+FreeBSD had a bug which caused kqueue/poll/select to fail to detect
+that a writev() on a pipe has been made. This bug should have been fixed
+in FreeBSD 6.3 and FreeBSD 7.0. More information can be found at:
+NetBSD and DragonFlyBSD probably have or have had the same bug.
+getcwd() on Solaris 9 can cause an emulator crash. If you have async-threads
+enabled you can increase the stack size of the async-threads as a temporary
+workaround. See the +a command-line argument in the documentation of erl(1).
+Without async-threads the emulator isn't as vulnerable to this bug, but if
+you hit it without async-threads the only workaround available is to enable
+async-threads and increase the stack size of the async-threads.
+Sun has however released patches that fixes the issue:
+Problem Description: 6448300 large mnttab can cause stack overrun during
+ Solaris 9 getcwd
+Required utilities
+These are the tools you will need in order to unpack and build Erlang/OTP.
+ Unpacking
+ ---------
+ GNU unzip, or a modern uncompress.
+ A TAR program that understands the GNU TAR format for long
+ filenames (such as GNU TAR).
+ Compiling
+ ---------
+ GNU make
+ GNU C compiler
+ Perl 5
+ GNU m4 If hipe (native code) support is enabled.
+ ncurses (Or termcap or termlib.) The development headers and
+ libraries are needed, often known as ncurses-devel.
+ (Use --without-termcap to build without any of these
+ libraries. Only the old shell (without any line
+ editing) can be used.)
+ OpenSSL Optional, but needed for building the Erlang/OTP
+ applications 'ssl' and 'crypto'. You need the
+ "development package" of OpenSSL, i.e. including
+ the header files. For building the application 'ssl'
+ the OpenSSL binary command program 'openssl' is also
+ needed.
+ At least version 0.9.7 of OpenSSL is required.
+ Sun Java jdk-1.5.0 Or higher. Optional but needed for building
+ the Erlang/OTP application 'jinterface' and parts
+ of 'ic' and 'orber'. We have also tested
+ IBM's JDK 1.5.0.
+ X Windows Optional, but development headers and libraries
+ are needed to build the Erlang/OTP application 'gs'
+ on Unix/Linux.
+ sed There seem to be some problems with some of the
+ 'sed' version on Solaris. Make sure "/bin/sed"
+ or "/usr/bin/sed" is used on the Solaris platform.
+ Flex Optional, headers and libraries are needed to
+ build the flex scanner for the megaco application
+ on Unix/Linux.
+ Installing
+ ----------
+ An 'install' program that can take multiple file names.
+How to build and install Erlang/OTP
+If you are building in a Git reposistory, see
+The following instructions are for building using the
+source tar ball.
+Start by unpacking the Erlang/OTP distribution file with your
+GNU compatible TAR
+ 1) gunzip -c otp_src_R13B03.tar.gz | tar xf -
+ 1) zcat otp_src_R13B03.tar.gz | tar xf -
+Now cd into the base directory
+ 2) cd otp_src_R13B03
+On some platforms Perl may behave strangely if certain locales are set,
+so optionally you may need to set the LANG variable:
+ 3a) LANG=C; export LANG #Bourne shell
+ 3b) setenv LANG C #C-shell
+Run the following commands
+ 4a) ./configure [ options ]
+ 4b) ./configure --prefix=<BaseDir> [ other options ]
+By default, Erlang/OTP will be installed in /usr/local/{bin,lib/erlang,man/man1}.
+To instead install in <BaseDir>/{bin,lib/erlang,man/man1}, use the --prefix=<BaseDir>
+If you upgraded the source with some patch you may need to clean up
+from previous builds before the new build. Do a "make clean"; see
+"Caveats" below.
+ 5) make
+ 6) make install
+Let's go through them in some detail:
+Step 4 runs a configuration script created by the GNU autoconf
+utility, which checks for system specific features and then creates a
+number of makefiles.
+The configure script allows you to customize a number of parameters;
+type "./configure --help" for details.
+One of the things you can specify is where Erlang/OTP should be installed: by
+default Erlang/OTP will be installed in /usr/local/{bin,lib/erlang,man/man1};
+to keep the same structure but install in a different place, <Dir> say,
+use the --prefix argument like this:
+"./configure --prefix=<Dir>".
+This step will also configure any additional libraries unpacked in step 3
+(if you didn't add any of the extra libraries configure will issue a warning
+saying that there is no configuration information in lib; this warning can
+safely be ignored).
+You can also specify where the OpenSSL include and library files are
+located, or alternatively disable the use of SSL and Crypto.
+(The details can be found by typing './configure --help'.)
+Other options are:
+ --enable-smp-support See the next section.
+ --disable-smp-support See the next section.
+ --disable-threads Disable support for threaded I/O;
+ this option also disables building
+ of the SMP emulator. (See the next section.)
+ --enable-threads Enable support for threaded I/O.
+ (This is the default if SMP support is enabled.
+ See the next section.)
+ --disable-hipe Disable HiPE (High-Performance Erlang).
+ HiPE will automatically be enabled on
+ supported platforms.
+ Step 5 builds the Erlang/OTP system. On a fast computer,
+this will take about 5 minutes. After completion of this step,
+you should have a working Erlang/OTP system which you can
+try by typing "bin/erl". This should start up Erlang/OTP and give you
+a prompt.
+ Step 6 is optional. It installs Erlang/OTP (if you change your
+mind about where you wish to install you can rerun step 4, without
+having to do step 5 again).
+The source tree is delivered with a lot of platform independent
+build results already pre-built. If you want to remove these pre-built
+files, invoke './otp_build remove_prebuilt_files' from the $ERL_TOP
+directory. After you have done this, you can build exactly the same way
+as before, but the build process will take a much longer time.
+NOTE: Doing 'make clean' in an arbitrary directory of the source tree,
+may remove files needed for bootstrapping the build. Doing
+'./otp_build save_bootstrap' from the $ERL_TOP directory before
+doing 'make clean' will ensure that it will be possible to build after
+doing 'make clean'. './otp_build save_bootstrap' will be invoked
+automatically when 'make' is invoked from ERL_TOP with either the
+clean target, or the default target. It is also automatically invoked
+if './otp_build remove_prebuilt_files' is invoked.
+If you or your system has special requirements please read the
+Makefile for additional configuration information.
+Support for SMP (Symmetric Multi Processing)
+An emulator with SMP support will be built by default on most platforms
+if a usable POSIX thread library or native Windows threads is found.
+You can force building of an SMP emulator, by using
+"./configure --enable-smp-support". However, if configure doesn't
+automatically enable SMP support, the build is very likely to fail.
+Use "./configure --disable-smp-support" if you for some reason don't
+want to have the emulator with SMP support built.
+If SMP support is enabled, support for threaded I/O will also be turned on
+(also in the emulator without SMP support).
+The 'erl' command will automatically start the SMP emulator if the
+computer has more than one logical processor. You can force a start
+of the emulator with SMP support by passing '-smp enable' as
+command line arguments to erl, and you can force a start of the
+emulator without SMP support by passing '-smp disable'.
+How to install the Erlang/OTP documentation
+For some graphical tools to find the on-line help you have to install
+the HTML documentation on top of the installed OTP applications, i.e.
+ cd <PrefixDir>/lib/erlang
+ gunzip -c otp_html_R<XY>B-<Z>.tar.gz | tar xf -
+For "erl -man <page>" to work the Unix manual pages have to be
+installed in the same way, i.e.
+ cd <PrefixDir>/lib/erlang
+ gunzip -c otp_man_R<XY>B-<Z>.tar.gz | tar xf -
+GS (Graphic System)
+GS now Tcl/Tk 8.4. It will be searched for when starting GS.
+Using HiPE
+HiPE supports the following system configurations:
+ All 32-bit and 64-bit mode processors should work.
+ The following systems are supported:
+ Linux:
+ Fedora Core is supported.
+ Both 32-bit and 64-bit modes are supported.
+ NPTL glibc is strongly preferred, or a LinuxThreads
+ glibc configured for "floating stacks". Old non-floating
+ stacks glibcs have a fundamental problem that makes HiPE
+ support and threads support mutually exclusive.
+ Solaris:
+ Solaris 10 (32-bit and 64-bit) and 9 (32-bit) are
+ supported.
+ The build requires a version of the GNU C compiler (gcc)
+ that has been configured to use the GNU assembler (gas).
+ Sun's x86 assembler is emphatically /not/ supported.
+ FreeBSD:
+ FreeBSD 6.1 and 6.2 in 32-bit and 64-bit modes should work.
+ MacOSX/Darwin:
+ Darwin 9.8.0 in 32-bit mode should work.
+ All 32-bit 6xx/7xx(G3)/74xx(G4) processors should work.
+ 32-bit mode on 970 (G5) and POWER5 processors should work.
+ Linux (Yellow Dog) and Mac OSX 10.4 are supported.
+ All UltraSPARC processors running 32-bit user code should work.
+ Solaris 9 and Linux (Aurora) are supported.
+ On Solaris the build requires a gcc that has been configured
+ to use Sun's assembler and linker. Using the GNU assembler but
+ Sun's linker has been known to cause problems.
+ ARMv5TE (i.e. XScale) processors should work.
+ Both big-endian and little-endian modes are supported.
+ Linux is supported.
+HiPE is automatically enabled on the following systems:
+ x86 in 32-bit mode: Linux, Solaris, FreeBSD
+ x86 in 64-bit mode: Linux, Solaris, FreeBSD
+ PowerPC: Linux, MacOSX
+ SPARC: Linux
+ ARM: Linux
+On other supported systems you need to "./configure --enable-hipe".
+If you are running on a platform supporting HiPE and if
+you have not disabled HiPE, you can compile a module into
+native code like this from the Erlang shell:
+ c(Module, native).
+ c(Module, [native|OtherOptions]).
+Using the erlc program, write like this:
+ erlc +native Module.erl
+The native code will be placed into the beam file and automatically
+loaded when the beam file is loaded.
+To add hipe options, write like this from the Erlang shell:
+ c(Module, [native,{hipe,HipeOptions}|MoreOptions]).
+ hipe:help_options().
+to print out the available options.
+Mac OS X (Darwin)
+We test Mac OS X 10.4.11 (Tiger) and Mac OS X 10.5.x (Leopard)
+in our daily builds (but only on Intel processors).
+Make sure that the command "hostname" returns a valid fully qualified
+host name (this is configured in "/etc/hostconfig").
+If you develop linked-in drivers (shared library) you need to link
+using "gcc" and the flags "-bundle -flat_namespace -undefined
+suppress". You also include "-fno-common" in CFLAGS when
+compiling. Use ".so" as the library suffix.
+Universal 32bit binaries can be built on an Intel Mac using the
+--enable-darwin-universal configure option. There still may occur
+problems with certain applications using this option, but the base
+system should run smoothly.
+When building universal binaries on a PowerPC Mac (at least on Tiger),
+you must point out a suitable SDK that contains universal binaries.
+For instance, to build universal binaries for Tiger (10.4):
+CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" ./configure --enable-darwin-universal
+Also, if you run Leopard, but want to build for Tiger, you must do
+before running the above configure command.
+Experimental support for 64bit x86 darwin binaries can be enabled
+using the --enable-darwin-64bit configure flag. The 64bit binaries are
+best built and run on Leopard, but most of the system also works on
+Tiger (Tiger's 64bit libraries are, however, limited; therefore e.g. odbc,
+crypto, ssl etc. are not supported in Tiger). 64bit PPC binaries are not
+supported and we have no plans to add such support (no machines to
+test on).
+Universal binaries and 64bit binaries are mutually exclusive options.
+Make and the variable "ERL_TOP"
+All the makefiles in the entire directory tree use the environment
+variable ERL_TOP to find the absolute path of the installation. The
+configure script will figure this out and set it in the top level
+Makefile (which, when building, it will pass on). However, when
+developing it is sometimes convenient to be able to run make in a
+subdirectory. To do this you must set the ERL_TOP variable
+before you run make.
+For example, assume your GNU make program is called "make" and you
+want to rebuild the application STDLIB, then you could do:
+ cd lib/stdlib; env ERL_TOP=<Dir> make
+where <Dir> would be what you find ERL_TOP is set to in the top level
+Authors are mostly listed in the application's AUTHORS files,
+that is $ERL_TOP/lib/*/AUTHORS and $ERL_TOP/erts/AUTHORS,
+not in the individual source files.
+More Information
+More information can be found at
63 README.bootstrap
@@ -0,0 +1,63 @@
+Notes about prebuilt beam files under version control
+This information applies mostly to developers, some parts only
+to developers of the main branch i.e. Ericsson and HiPE personel.
+There are two types of derived code under version control, namely:
+primary bootstrap - Resides in the $ERL_TOP/bootstrap/{lib,bin} directories.
+preloaded code - Resides in the $ERL_TOP/erts/preloaded directory.
+Primary bootstrap
+The two types of version controlled code are fundamentally
+different. The primary bootstrap is code compiled from source files in
+the lib/{kernel,stdlib,compiler} (and header files from
+lib/orber/include. They are checked in in the version control system
+to make it possible to build directly from the code base tree without
+the need for an earlier version of the compiler. When a new version of
+OTP is released, these files are updated manually (or rather, by using
+the $ERL_TOP/otp_build script) and checked in. The files can also be
+updated due to changes in the compiler during the development
+process. The primary bootstrap is always updated as a separate
+deliberate process, never during a normal development build.
+If a prebuilt open source version of erlang is used, the directory
+bootstrap initially does not contain any beam files, the directory is
+instead populated by copying beam files from the
+$ERL_TOP/lib/{kernel,stdlib,compiler}/ebin directories. This
+construction is to save space in the distribution, but the result
+would be the same. Open source developers need not provide patches for
+the precompiled beam files in the primary bootstrap, the bootstrap
+update is always performed by the main developers.
+Preloaded code
+The directory $ERL_TOP/preloaded contains both src and ebin
+subdirectories. The preloaded code is compiled into the virtual
+machine and always present. When compiling the virtual machine, those
+beam files need to be present and they are considered a part of the
+virtual machine rather than a part of the kernel application. When
+preloaded files are to be updated, the source code is built using a
+special Makefile in the $ERL_TOP/preloaded/src directory, which
+creates beam files in the same directory. When they seem to compile
+successfully, they can be used in an emulator build by being copied
+to the ebin directory (although, in Clearcase that requires checking
+out the files in the ebin directory first). For developers using the
+main Clearcase branch, otp_build {prepare,update,commit}_preloaded can
+be used to ease the process (there are also similar targets in the
+In prebuilt open source distributions, these .beam files are also
+present, but to update them one might need to change permission on the
+$ERL_TOP/preloaded/ebin directory, then build and then manually copy
+the beam files from the source directory to ../ebin. If patches are
+created that involve the source files used to build preloaded code,
+always note this specially as the preloaded/ebin directory needs
+updating, or provide the new derived files in the patch or as complete
+/Patrik, OTP
749 README.win32
@@ -0,0 +1,749 @@
+How to build Erlang/OTP on Windows.
+Table of contents
+1. Introduction
+2. Answers to some "frequently asked questions"
+3. Tools you need and their environment
+4. The shell environment
+5. Building and installing
+6. Development
+7. Final words
+Copyright Ericsson AB 2003-2009. All Rights Reserved.
+The contents of this file are subject to the Erlang Public License,
+Version 1.1, (the "License"); you may not use this file except in
+compliance with the License. You should have received a copy of the
+Erlang Public License along with this software. If not, it can be
+retrieved online at
+Software distributed under the License is distributed on an "AS IS"
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+the License for the specific language governing rights and limitations
+under the License.
+This file describes how to build the Erlang emulator and the OTP
+libraries on Windows. The instructions apply to versions of Windows
+supporting the Cygwin emulated gnuish environment for Windows. We've
+built on the following platforms: Windows 2000 Professional, Windows
+2003 server, Windows XP Home/Professional, and Windows Vista. Any
+Windows95'ish platform will surely get you into trouble, what I'm not
+sure of, but it certainly will...
+The procedure described uses Cygwin as a build environment, you run
+the bash shell in Cygwin and uses gnu make/configure/autoconf etc to
+do the build. The emulator C-source code is, however, mostly compiled
+with Microsoft Visual C++(tm), producing a native Windows binary. This
+is the same procedure as we use to build the pre-built binaries. The
+fact that we use VC++ and not gcc is explained further in the FAQ
+I describe the build procedure to make it possible for open source
+customers to build the emulator, given that they have the needed
+tools. The binary Windows releases is still a preferred alternative if
+one does not have Microsoft's development tools and/or don't want to
+install Cygwin.
+To use Cygwin, one needs basic experience from a Unix environment, if
+one does not know how to set environment variables, run programs etc
+in a Unix environment, one will be quite lost in the Cygwin
+ditto. I can unfortunately not teach all the world how to use
+Cygwin and bash, neither how to install Cygwin nor perform basic tasks
+on a computer. Please refer to other documentation on the net for
+help, or use the binary release instead if you have problems using the
+However, if you feel comfortable with the environment and build
+system, and have all the necessary tools, you have a great opportunity
+to make the Erlang/OTP distribution for Windows better. Please submit
+any suggestions and patches to the appropriate mailing lists (see
+ to let them find their way into the next
+version of Erlang. If making changes to the build system (like
+makefiles etc) please bear in mind that the same makefiles are used on
+Unix/VxWorks/OSEDelta, so that your changes don't break other
+platforms. That of course goes for C-code too, system specific code
+resides in the $ERL_TOP/erts/emulator/sys/win32 and $ERL_TOP/erts/etc/win32
+directories mostly. The $ERL_TOP/erts/emulator/beam directory is for
+common code.
+Before the R9C release of Erlang/OTP, the Windows release was built
+partly on a Unix (Solaris) box and partly on a Windows box, using Perl
+hacks to communicate and sync between the two machines. R9C was the
+first release ever built solely on Windows, where no Unix machine is
+needed at all. Now we've used this build procedure for a couple of
+releases, and it has worked fine for us. Still, there might be all
+sorts of troubles on different machines and with different
+setups. I'll try to give hints wherever I've encountered difficulties,
+but please share your experiences by using the mailing list I cannot of course help everyone with all
+their problems, please try to solve the problems and submit
+solutions/workarounds. Remember, it's all about sharing, not about
+Lets go then, I'll start with a little FAQ, based on in house questions
+and misunderstandings.
+Answers to "frequently asked questions"
+Q: So, now I can build Erlang using GCC on Windows?
+A: No, unfortunately not. You'll need Microsoft's Visual C++ still, a
+Bourne-shell script ( wraps the Visual C++ compiler and runs it
+from within the Cygwin environment. All other tools needed to build
+Erlang are free-ware/open source, but not the C compiler.
+Q: Why haven't you got rid of VC++ then, you ******
+A: Well, partly because it's a good compiler - really! Actually it's
+been possible in late R11-releases to build using mingw instead of
+visual C++ (you might see the remnants of that in some scripts and
+directories). Unfortunately the development of the SMP version for
+Windows broke the mingw build and we chose to focus on the VC++ build
+as the performance has been much better in the VC++ versions. The
+mingw build will be back, but as long as VC++ gives better
+performance, the commercial build will be a VC++ one.
+Q: OK, VC++ you need, but now you've started to demand a very recent
+(and expensive) version of Visual studio, not the old and stable VC++
+6.0 that was used in earlier versions. Why?
+A: The SMP version of Erlang needs features in the Visual Studio
+2005. Can't live without them. Besides the new compiler gives the
+Erlang emulator a ~40% performance boost(!)
+Q: Can/will I build a Cygwin binary with the procedure you describe?
+A: No, the result will be a pure Windows binary, and as far as I know,
+it's not possible to make a Cygwin binary yet. That is of course
+something desirable, but there are still some problems with the
+dynamic linking (dynamic Erlang driver loading) as well as the TCP/IP
+emulation in Cygwin, which, I'm sure of, will improve, but still has
+some problems. Fixing those problems might be easy or might be hard.
+I suggest you try yourself and share your experience. No one would be
+happier if a simple ./configure && make would produce a fully fledged
+Cygwin binary. Ericsson does however not pay me to do a Cygwin port, so
+such a port would have to happen in spare time, which is a limited resource...
+Q: Hah, I saw you, you used GCC even though you said you didn't!
+A: OK, I admit, one of the files is compiled using Cygwin's GCC and
+the resulting object code is then converted to MS VC++ compatible coff
+using a small C hack. It's because that particular file, beam_emu.c
+benefits immensely from being able to use the GCC labels-as-values
+extension, which boosts emulator performance by up to 50%. That does
+unfortunately not (yet) mean that all of OTP could be compiled using
+GCC, that particular source code does not do anything system specific
+and actually is adopted to the fact that GCC is used to compile it on
+Q: So now there's a MS VC++ project file somewhere and I can build OTP
+using the nifty VC++ GUI!
+A: No, never. The hassle of keeping the project files up to date and
+do all the steps that constitute an OTP build from within the VC++ GUI
+is simply not worth it, maybe even impossible. A VC++ project
+file for Erlang/OTP will never happen, at least I will never make
+one. Clicking around in super-multi-tab'd dialogs to add a file or
+compiler option when it's so much easier in a makefile is simply not
+my style.
+Q: So how does it all work then?
+A: Cygwin is the environment, which closely resembles the environments
+found on any Unix machine. It's almost like you had a virtual Unix
+machine inside Windows. Configure, given certain parameters, then
+creates makefiles that are used by the Cygwin gnu-make to built the
+system. Most of the actual compilers etc are not, however, Cygwin
+tools, so I've written a couple of wrappers (Bourne-shell scripts),
+which reside in $ERL_TOP/etc/win32/cygwin_tools and they all do
+conversion of parameters and switches common in the Unix environment
+to fit the native Windows tools. Most notable is of course the paths,
+which in Cygwin are Unix-like paths with "forward slashes" (/) and no
+drive letters, the Cygwin specific command 'cygpath' is used for most
+of the path conversions. Luckily most compilers accept forward slashes
+instead of backslashes as path separators, one still have to get the
+drive letters etc right, though. The wrapper scripts are not general
+in the sense that, for example, would understand and translates
+every possible gcc option and passes correct options to cl.exe. The
+principle is that the scripts are powerful enough to allow building of
+Erlang/OTP, no more, no less. They might need extensions to cope with
+changes during the development of Erlang, that's one of the reasons I
+made them into shell-scripts and not Perl-scripts, I believe they are
+easier to understand and change that way. I might be wrong though,
+cause another reason I didn't write them in Perl is because I've never
+liked Perl and my Perl code is no pleasant reading...
+In $ERL_TOP, there is a script called otp_build, that script handles
+the hassle of giving all the right parameters to configure/make and
+also helps you set up the correct environment variables to work with
+the Erlang source under Cygwin.
+Q: You use and need Cygwin, but then you haven't taken the time to
+port Erlang to the Cygwin environment but instead focus on your
+commercial release, is that really ethical?
+A: No, not really, but see this as a step in the right direction. I'm
+aiming at GCC compiled emulators and a Cygwin version, but I really
+need to do other things as well... In time, but don't hold your
+Q: Can I build something that looks exactly as the commercial release.
+A: Yes, we use the exactly same build procedure.
+Q: Which version of Cygwin and other tools do you use then?
+A: For Cygwin we try to use the latest releases available when
+building. What versions you use shouldn't really matter, I try to
+include workarounds for the bugs I've found in different Cygwin
+releases, please help me to add workarounds for new Cygwin-related
+bugs as soon as you encounter them. Also please do submit bug reports
+to the appropriate Cygwin developers. The Cygwin GCC we used for R13B
+was version 3.4.4. We used VC++ 8.0 (i.e. Visual studio 2005 SP1),
+Sun's JDK 1.5.0_17, NSIS 2.37, and Win32 OpenSSL 0.9.8e. Please read
+the next section for details on what you need.
+Q: Can you help me setup X in Cygwin?
+A: No, unfortunately I haven't got time to help with Cygwin related
+user problems, please read Cygwin related web sites, newsgroups and
+mailing lists.
+Q: Why is the instruction so long? Is it really that complicated?
+A: Partly it's long because I babble too much, partly because I've
+described as much as I could about the installation of the needed
+tools. Once the tools are installed, building is quite easy. I also
+have tried to make this instruction understandable for people with
+limited Unix experience. Cygwin is a whole new environment to some
+Windows users, why careful explanation of environment variables etc
+seemed to be in place. The short story, for the experienced and
+impatient is:
+* Get and install complete Cygwin (latest)
+* (Buy and) Install Microsoft Visual studio 2005 and SP1 (or higher)
+* Get and install Sun's JDK 1.4.2
+* Get and install NSIS 2.01 or higher (up to 2.30 tried and working)
+* Get and install OpenSSL 0.9.7c or higher
+* Get and unpack wxWidgets-2.8.9 or higher to /opt/local/pgm inside cygwin
+ - open /cygwin/opt/local/pgm/wxWidgets-2.8.9/build/msw/wx.dsw
+ in include/wx/msw/setup.h
+ - build all unicode release (and unicode debug) packages
+ - open /cygwin/opt/local/pgm/wxWidgets-2.8.9/contrib/build/stc/stc.dsw
+ - build the unicode release (and unicode debug) packages
+* Get and unpack the erlang source distribution with Cygwin's tar.
+* set ERL_TOP to where you unpacked the source distribution
+* $ cd $ERL_TOP
+* Get (from
+and unpack the prebuilt TCL/TK binaries for windows with cygwin tar,
+standing in $ERL_TOP
+* Modify PATH and other environment variables so that all these tools
+are runnable from a bash shell. Still standing in $ERL_TOP, issue the following
+$ eval `./otp_build env_win32`
+$ ./otp_build autoconf
+$ ./otp_build configure
+$ ./otp_build boot -a
+$ ./otp_build release -a
+$ ./otp_build installer_win32
+$ release/win32/otp_win32_<OTP version> /S
+Voila! "Start->Programs->Erlang OTP <OTP version>->Erlang" starts the Erlang
+Windows shell.
+Tools you need and their environment
+You need some tools to be able to build Erlang/OTP on Windows. Most
+notably you'll need Cygwin and Microsoft VC++, but you also might want
+a Java compiler, the NSIS install system and OpenSSL. Only VC++ costs
+money, but then again it costs a lot of money, I know...
+Well' here's the list:
+* Cygwin, the very latest is usually best. Get all the development
+tools and of course all the basic ditto. In fact getting the complete
+package might be a good idea, as you'll start to love Cygwin after a
+while if you're accustomed to Unix. Make sure to get jar and also make
+sure *not* to install a Cygwin'ish Java... The Cygwin jar command is
+used but Sun's Java compiler and virtual machine...
+- get the installer from the web site and use that to install
+Cygwin. Be sure to have fair privileges. If you're on a NT domain you
+should consider running "mkpasswd -d" and "mkgroup -d" after the
+installation to get the user databases correct. See their respective
+manual pages.
+When you start you first bash shell, you will get an awful prompt. You
+might also have a PATH environment variable that contains backslashes
+and such. Edit $HOME/.profile and $HOME/.bashrc to set fair prompts
+and set a correct PATH. Also do a "export SHELL" in .profile. For some
+non-obvious reason the environment variable $SHELL is not exported in
+bash. Also note that .profile is run at login time and .bashrc when
+sub shells are created. You'll need to explicitly source .bashrc from
+.profile if you want the commands there to be run at login time (like
+setting up aliases, shell functions and the like). I personally
+usually do like this at the end of .profile:
+export ENV
+. $ENV
+You might also, if you're a hard core type of person at least, want to
+setup X-windows (XFree86), that might be as easy as running startx
+from the command prompt and it might be much harder. Use Google to
+find help...
+If you don't use X-windows, you might want to setup the Windows
+console window by selecting properties in the console system menu
+(upper left corner of the window, the Cygwin icon in the title
+bar). Especially setting a larger screen buffer size (lines) is useful
+as it gets you a scrollbar so you can see whatever error messages
+that might appear...
+If you want to use (t)csh instead of bash you're on your own, I
+haven't tried and know of no one that has. I expect
+that you use bash in all shell examples.
+* Microsoft Visual Studio 2005 SP1. Please don't skip the service
+pack! The installer might update your environment so that you can run
+the 'cl' command from the bash prompt, then again it might
+not... There is always a BAT file in VC\Bin under the installation
+directory (default C:\Program Files\Microsoft Visual Studio 8) called
+VCVARS32.BAT. Either add the environment settings in that file to the
+global environment settings in Windows or add the corresponding BASH
+environment settings to your .profile/.bashrc. For example, in my case
+I could add the following to .profile
+#Visual C++ Root directory as Cygwin style pathname
+VCROOT=/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio 8
+# Visual C++ Root directory as Windows style pathname
+WIN_VCROOT="C:\\Program Files\\Microsoft Visual Studio 8"
+# The PATH variable should be Cygwin'ish
+# Lib and INCLUDE should be Windows'ish
+# Note that semicolon (;) is used to separate Windows style paths but
+# colon (:) to separate Cygwin ditto!
+Make a simple hello world and try to compile it with the 'cl' command
+from within bash. If that does not work, your environment needs
+fixing. Also remember to fix up the PATH environment, especially old
+Erlang installations might have inserted quoted paths that Cygwin does
+not understand. Remove or correct such paths. There should be no
+backslashes in your path environment variable in Cygwin bash, but LIB
+and INCLUDE should contain Windows style paths with semicolon,
+drive letters and backslashes.
+* Sun's Java JDK 1.5.0 or higher. Our Java code (jinterface, ic) is
+written for JDK 1.5.0. Get it for Windows and install it, the JRE is
+not enough. If you don't care about Java, you can skip this step, the
+result will be that jinterface is not built.
+Add javac *LAST* to your path environment in bash, in my case this means:
+PATH="$PATH:/cygdrive/c/Program Files/Java/jdk1.5.0_17/bin"
+No CLASSPATH or anything is needed. Type "javac" at the bash prompt
+and you should get a list of available Java options. Make sure by
+typing "which java" that you use the Java you installed. Note however that
+Cygwin's jar.exe is used, that's why the JDK bin-directory should be
+added last in the PATH.
+* Nullsoft NSIS installer system. You need this to build the self
+installing package. It's a free open source installer that's much
+nicer to use than the commercial Wise and Install shield
+installers. This is the installer we use for commercial releases as
+well from R9C an on.
+Install the lot, especially the modern user interface components, as
+it's definitely needed. Put "makensis" in your path, in my case:
+PATH=/cygdrive/c/Program\ Files/NSIS:$PATH
+type makensis at the bash prompt and you should get a list of options
+if everything is OK.
+* OpenSSL for Windows. This is if you want the SSL and crypto
+applications to compile (and run). Go to, click
+on the "Related" link and then on the "Binaries" link (upper right
+corner of the page last time I looked), you can then reach the
+"Shining Lights Productions" Web site for Windows binaries
+distributions. Get the latest or 0.9.7c if you get trouble with the
+latest. It's a nifty installer. The rest should be handled by
+configure, you needn't put anything in the path or anything.
+If you want to build openssl for windows yourself (which might be
+possible, as you wouldn't be reading this if you weren't a
+compile-it-yourself person), you either have to put the resulting
+DLL's in your path or in the windows system directory and either
+specify where you put the includes etc with the configure-parameter
+--with-ssl=<cygwin path to the root> or put your installation directly
+under c:\OpenSSL. The directory structure under the installation root
+for OpenSSL is expected to be one with subdirectories named "include",
+"bin" and "lib", possibly with a "VC" subdirectory of "lib" containing
+the actual .lib files. Note that the cygwin distributed OpenSSL cannot be
+used, it results in cygwin depending binaries and it has unix style
+archives (.a, not .lib).
+* Building with wxWidgets. Download wxWidgets-2.8.9 or higher patch
+release (2.9.* is a developer release which currently does not work
+with wxErlang).
+Install or unpack it to DRIVE:/PATH/cygwin/opt/local/pgm
+Open from explorer (i.e. by double clicking the file)
+In Microsoft Visual Studio, click File/Open/File, locate and
+open: C:\cygwin\opt\local\pgm\wxMSW-2.8.10\include\wx\msw\setup.h
+Build it by clicking Build/Batch Build and select all unicode release
+(and unicode debug) packages.
+Open C:\cygwin\opt\local\pgm\wxMSW-2.8.10\contrib/build/stc/stc.dsw
+and batch build all unicode packages.
+* The Erlang source distribution. The same as for Unix
+platforms. Preferably use tar from within Cygwin to unpack the source
+tar.gz (tar zxf otp_src_R13B03.tar.gz).
+set the environment ERL_TOP to point to the root directory of the
+source distribution. Let's say I stood in $HOME/src and unpacked
+otp_src_R13B03.tar.gz, I then add the following to .profile:
+export $ERL_TOP
+* The TCL/TK binaries. You could compile Tcl/Tk for windows yourself,
+but you can get a stripped down version from our website which is
+suitable to include in the final binary package. If you want to supply
+tcl/tk yourself, read the instructions about how the tcl/tk tar file
+used in the build is constructed under $ERL_TOP/lib/gs/tcl. The easy
+way is to download
+ and unpack it
+standing in the $ERL_TOP directory. This will create the file
+win32.tar.gz in $ERL_TOP/lib/gs/tcl/binaries.
+One last alternative is to create a file named 'SKIP' in the
+$ERL_TOP/lib/gs/ after configure is run, but that will give you an
+erlang system without gs (which might be okay as you probably will use
+wx anyway).
+The shell environment
+So, if you have followed the instructions above, when you start a bash
+shell, you should have an INCLUDE environment with a Windows style
+path, a LIB environment variable also in Windows style, and finally a
+PATH that let's you reach cl, makensis, javac etc from the
+command prompt (use "which cl" etc to verify from bash).
+You should also have an ERL_TOP environment variable that is *Cygwin
+style*, and points to a directory containing, among other files, the
+script "otp_build".
+A final massage of the environment is needed, and that is done by
+the script $ERL_TOP/otp_build. Start bash and do the following, note
+the "back-ticks" (`), can be quite hard to get on some keyboards, but
+pressing the back-tick key followed by the space bar might do it...
+$ cd $ERL_TOP
+$ eval `./otp_build env_win32`
+If you're unable to produce back-ticks on your keyboard, you can use
+the ksh variant:
+$ cd $ERL_TOP
+$ eval $(./otp_build env_win32)
+This should do the final touch to the environment and building should
+be easy after this. You could run "./otp_build env_win32" without
+"eval" just to see what it does, and to see that the environment it
+sets seems OK. The path is cleaned of spaces if possible (using DOS
+style short names instead), the variables OVERRIDE_TARGET, CC, CXX, AR
+and RANLIB are set to their respective wrappers and the directories
+$ERL_TOP/erts/etc/win32/cygwin_tools/vc and
+$ERL_TOP/erts/etc/win32/cygwin_tool are added first in the PATH.
+Try now a "which erlc". That should result in the erlc wrapper script
+(which does not have the .sh extension, for reasons best kept
+untold...). It should reside in $ERL_TOP/erts/etc/win32/cygwin_tools.
+You could also try "which", which "" etc.
+Now you're ready to build...
+Building and installing
+Now it's assumed that you have executed "eval `./otp_build env_win32`"
+for this particular shell...
+Building is easiest using the otp_build script. That script takes care
+of running configure, bootstrapping etc on Windows in a simple
+way. The otp_build script is the utility we use ourselves to build on
+different platforms and it therefore contains code for all sorts of
+platforms. The principle is, however, that for non-Unix platforms, one
+uses "./otp_build env_<target>" to set up environment and then the
+script knows how to build on the platform "by itself". You've already
+run "./otp_build env_win32" in the step above, so now it's mostly like
+we build on any platform. OK, here are then steps; Assuming you will
+want to build a full installation executable with NSIS, you can omit
+<installation directory> and the release will be copied to
+$ERL_TOP/release/win32: and there is where the packed self installing
+executable will reside too.
+$ ./otp_build autoconf # Ignore the warning blob about versions of autoconf
+$ ./otp_build configure <optional configure options>
+$ ./otp_build boot -a
+$ ./otp_build release -a <installation directory>
+$ ./otp_build installer_win32 <installation directory> # optional
+Now you will have a file called otp_win32_R12B.exe in the <installation
+directory>, i.e. $ERL_TOP/release/win32.
+Lets get into more detail:
+$ ./otp_build autoconf - This step rebuilds the configure scripts to
+work correctly in the cygwin environment. In an ideal world, this
+would not be needed, but alas, we have encountered several
+incompatibilities between our distributed configure scripts (generated
+on a Linux platform) and the cygwin environment over the
+years. Running autoconf on cygwin ensures that the configure scripts
+are generated in a cygwin-compatible way and that they will work well
+in the next step.
+$ ./otp_build configure - This runs the newly generated configure scripts
+with options making configure behave nicely. The target machine type is
+plainly "win32", so a lot of the configure-scripts recognize this
+awkward target name and behave accordingly. The CC variable also makes
+the compiler be, which wraps MSVC++, so all configure tests
+regarding the C compiler gets to run the right compiler. A lot of the
+tests are not needed on Windows, but I thought it best to run the
+whole configure anyway. The only configure option you might want to
+supply is --with-ssl, which might be needed if you have built your own
+openssl distribution. The Shining Lights distribution should be found
+automatically by configure, if that fails, add a --with-ssl=<dir> that
+specifies the root directory of your OpenSSL installation.
+$ ./otp_build boot -a - This uses the bootstrap directory (shipped
+with the source, $ERL_TOP/bootstrap) to build a complete OTP
+system. It first builds an emulator and sets up a minimal OTP system
+under $ERL_TOP/bootstrap, then starts to compile the different OTP
+compilers to make the $ERL_TOP/bootstrap system potent enough to be
+able to compile all Erlang code in OTP. Then, all Erlang and C code
+under $ERL_TOP/lib is built using the bootstrap system, giving a
+complete OTP system (although not installed). When this is done, one
+can run Erlang from within the source tree, just type $ERL_TOP/bin/erl
+and you should have a prompt. If you omit the -a flag, you'll get a
+smaller system, that might be useful during development. Now
+exit from Erlang and start making a release of the thing:
+$ ./otp_build release -a - Builds a commercial release tree from the
+source tree, default is to put it in $ERL_TOP/release/win32, you can
+give any directory as parameter (Cygwin style), but it doesn't really matter
+if you're going to build a self extracting installer too. You could of
+course build release to the final directory and then run ./Install.exe
+standing in the directory where the release was put, that will create
+a fully functional OTP installation. But let's make the nifty
+$ ./otp_build installer_win32 - Create the self extracting installer
+executable. The executable otp_win32_<OTP version>.exe will be placed
+in the top directory of the release created in the previous step. If
+no release directory is specified, the release is expected to have
+been built to $ERL_TOP/release/win32, which also will be the place
+where the installer executable will be placed. If you specified some
+other directory for the release (i.e.
+./otp_build release -a /tmp/erl_release), you're expected to give the
+same parameter here, (i.e. ./otp_build installer_win32 /tmp/erl_release).
+You need to have a full NSIS installation and makensis.exe in your
+path for this to work of course. Once you have created the installer,
+you can run it to install Erlang/OTP in the regular way, just run the
+executable and follow the steps in the installation wizard. To get all
+default settings in the installation without any questions asked, you
+run the executable with the parameter "/S" (capital S). like in:
+$ cd $ERL_TOP
+$ release/win32/otp_win32_R13B03 /S
+- and after a while Erlang will have been installed in
+C:\Program Files\erl5.7.4, with shortcuts in the menu etc.
+*NOTE* Beginning with R9C, the Windows installer does *not* add Erlang
+to the system wide path. If one wants to have Erlang in the path, one
+has to add it by hand.
+The necessary setup of an Erlang installation is actually done by the
+program Install.exe, which resides in the release top. That program
+creates ".ini-files" and copies the correct boot scripts. If one has
+the correct directory tree (like after a ./otp_build release -a), only
+the running of Install.exe is necessary to get a fully functional
+OTP. What the self extracting installer adds is (of course) the
+possibility to distribute the binary easily, together with adding
+shortcuts to the Windows start menu. There is also some adding of
+entries in the registry, to associate .erl and .beam files with Erlang
+and get nifty icons, but that's not something you'll really need to
+run Erlang. The registry is also used to store uninstall information,
+but if one has not used the self extracting installer, one cannot
+(need not) do any uninstall, one just scratches the release directory
+and everything is gone. Erlang/OTP does not *need* to put anything
+in the Windows registry at all, and does not if you don't use the self
+extracting installer. In other words the installer is pure cosmetics.
+Once the system is built, you might want to change it. Having a test
+release in some nice directory might be useful, but you also can run